メモとして残しております。設計書です。
要件定義
目的と目標
- 接骨院・治療院の顧客管理と、分析
- 利用年齢層に応じたニーズへの対応
対象範囲
- 接骨院経営者
- PC・スマホ・タブレット
- 顧客管理・支払い金額・施術管理
機能要件
- 顧客管理、施術履歴管理、メニュー管理、施術メニュー管理など
非機能要件
- 管理者のみ登録可能、一般ユーザーは閲覧のみとする
運用要件
- さくらレンタルサーバー上にて運用予定
制約事項
- Laravel11
- Vue.js3
- Vuetify
- TypeScript
- chart.js
- Inertia.js
- MySQL
- 開発はDockerとVSCode
- デプロイはさくらのレンタルサーバー
- 特に無し
基本設計
システム構成
- Web三層アーキテクチャ
- SPAを基本とする
- 要件定義制約事項に同じ
画面設計
- 作成中
- 作成中
データ設計
- 顧客(cusomers)
- スタッフ(staffs)
- 施術メニュー(menus)
- 施術履歴(顧客・施術メニュー・担当スタッフ・日にち)(histrories)
機能概要設計
- 作成中
- 作成中
詳細設計
プログラム設計
- 作成中
- 作成中
画面詳細設計
- 作成中
- 作成中
データベース設計
Laravelデフォルトのものを使用。使わないカラムもありますが、そのままいきます。
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| name | string | ✅ | ||
| string | ✅ | |||
| email_verified_at | timestamp | |||
| password | string | ✅ | ||
| remember_token | string | |||
| created_at | timestamp | |||
| updated_at | timestamp |
顧客
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| last_name | string | ✅ | ||
| first_name | string | ✅ | ||
| last_name_kana | string | ✅ | ||
| first_name_kana | string | ✅ | ||
| postcode | string | ✅ | ||
| address | string | ✅ | ||
| tel | string unique | ✅ | ✅ | |
| birth | date | ✅ | ||
| gender | tinyInteger | ✅ | ||
| memo | text | |||
| delete_flg | boolean | ✅ | ||
| created_at | timestamp | |||
| updated_at | timestamp |
従業員
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| last_name | string | ✅ | ||
| first_name | string | ✅ | ||
| last_name_kana | string | ✅ | ||
| first_name_kana | string | ✅ | ||
| license | string | |||
| delete_flg | boolean | ✅ | ||
| created_at | timestamp | |||
| updated_at | timestamp |
施術メニュー
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| name | string | ✅ | ||
| price | integer | ✅ | ||
| time | integer | ✅ | ||
| genre_id | bigInt | ➡️ genres(id) | ✅ | |
| own_pay_flg | boolean | ✅ | ||
| hidden_flg | boolean | ✅ | ||
| created_at | timestamp | |||
| updated_at | timestamp |
施術メニューがマッサージか、鍼灸か機械かなど
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| name | string | ✅ |
メニューごと(1部位や1メニューごと1レコード)
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| history_id | bigInt | ➡️ histories(id) | ✅ | |
| menu_id | bigInt | ➡️ menus(id) | ✅ | |
| body_part | string | ✅ | ||
| memo | text | |||
| created_at | timestamp | |||
| updated_at | timestamp |
施術全体情報(誰が誰に対して行なった 詳細はmenu_historyテーブルで)
| カラム名 | 型 | PK / FK | UNIQUE | NOT NULL |
|---|---|---|---|---|
| id | bigInt | 🔑 | ✅ | ✅ |
| customer_id | bigInt | ➡️ customers(id) | ✅ | |
| staff_id | bigInt | ➡️ staffs(id) | ✅ | |
| date | datetime | ✅ | ||
| memo | text | |||
| created_at | timestamp | |||
| updated_at | timestamp |

URL設計
| No. | 名前 | URL | method | route-name | Vue | Controller |
|---|---|---|---|---|---|---|
| 1 | 顧客一覧 | /customers | get | customers.index | Customers/Index | CustomerController@index |
| 2 | 顧客登録画面 | /customers/create | get | customers.create | Customers/Create | CustomerController@create |
| 3 | 顧客登録 | /customers | post | customers.store | – | CustomerController@store |
| 4 | 顧客詳細画面 | /customers/{customer} | get | customers.show | Customers/Show | CustomerController@show |
| 5 | 顧客編集画面 | /customers/{customer}/edit | get | customers.edit | Customers/Edit | CustomerController@edit |
| 6 | 顧客更新 | /customers/{customer} | put | customers.update | – | CustomerController@update |
| 7 | 顧客削除 | /customers/{customer} | delete | customers.destroy | – | CustomerController@destroy |
| 8 | 顧客検索結果 | /customers | get | api.searchCustomers | – | Api\searchCustomerController@index |
| 9 | スタッフ一覧 | /staffs | get | staff.index | Staff/Index | StaffController@index |
| 10 | スタッフ登録画面 | /staffs/create | get | staff.create | Staff/Create | StaffController@create |
| 11 | スタッフ登録 | /staffs | post | staff.store | – | StaffController@store |
| 12 | スタッフ詳細画面 | /staffs/{staff} | get | staff.show | Staff/Show | StaffController@show |
| 13 | スタッフ編集画面 | /staffs/{staff}/edit | get | staff.edit | Staff/Edit | StaffController@edit |
| 14 | スタッフ更新 | /staffs/{staff} | put | staff.update | – | StaffController@update |
| 15 | スタッフ削除 | /staffs/{staff} | delete | staff.destroy | – | StaffController@destroy |
| 16 | メニュー一覧 | /menus | get | menu.index | Menu/Index | MenuController@index |
| 17 | メニュー登録画面 | /menus/create | get | menu.create | Menu/Create | MenuController@create |
| 18 | メニュー登録 | /menus | post | menu.store | – | MenuController@store |
| 19 | メニュー詳細画面 | /menus/{menu} | get | menu.show | Menu/Show | MenuController@show |
| 20 | メニュー編集画面 | /menus/{menu}/edit | get | menu.edit | Menu/Edit | MenuController@edit |
| 21 | メニュー更新 | /menus/{menu} | put | menu.update | – | MenuController@update |
| 22 | メニュー削除 | /menus/{menu} | delete | menu.destroy | – | MenuController@destroy |
| 23 | ジャンル一覧 | /genre | get | genre.index | Genre/Index | GenreController@Index |
| 24 | ジャンル登録画面 | /genres/create | get | genre.create | Genre/Create | GenreController@create |
| 25 | ジャンル登録 | /genres/create | post | genre.store | – | GenreController@store |
| 26 | ジャンル編集画面 | /genres/{genre}/edit | get | genre.edit | Genre/Edit | GenreController@edit |
| 27 | ジャンル更新 | /genres/{genre} | put | genre.update | – | GenreController@update |
| 28 | ジャンル削除 | /genres/{genre} | delete | genre.destroy | – | GenreController@destroy |
| 29 | 施術情報登録画面 | /histories/create | get | history.create | History/Create | HistoryController@create |
| 30 | 施術情報登録 | /histories | post | history.store | – | HistoryController@store |
| 31 | 施術履歴一覧画面 | /histories | get | history.index | History/Index | HistoryController@index |
| 32 | 施術履歴詳細画面 | /histories/{histories} | get | history.show | History/Show | HistoryController@show |
| 33 | 施術履歴編集画面 | /histories/{histories}/edit | get | history.edit | Hisotry/Edit | HistoryController@edit |
| 34 | 施術履歴更新 | /histories | put | history.update | – | HistoryController@update |
| 35 | 施術情報削除 | /histories | delete | history.destroy | – | HistoryController@destroy |
| 36 | 分析画面 | /analysis | get | analysis | Analysis | AnalysisController@index |
| 37 | 分析結果取得 | /api/analysis | get | api.analysis | – | Api\AnalysisController@index |
メモ
施術登録
日付・顧客名・メニューを一覧表示(ジャンル・金額)・施術部位(入力・追加できるようにする)・小計

