Lit-innosence / tus_yuurikai_system

MIT License
1 stars 0 forks source link

Feature/post-healthcheck #6

Closed Lit-innosence closed 1 month ago

Lit-innosence commented 1 month ago

json形式案1(フォーム)

{
    "data": {
        "student1": {
            "student_id": "4622999",
            "name": "山田 太郎",
        },
        "student2": {
            "student_id": "4623000",
            "name": "山田 次郎",
        }
    }
}

概要

Lit-innosence commented 1 month ago

json decode test

概要

Dot-P commented 1 month ago

json形式案1(フォーム)

{
    "data": {
        "student1": {
            "student_id": "4622999",
            "name": "山田 太郎",
        },
        "student2": {
            "student_id": "4623000",
            "name": "山田 次郎",
        }
    }
}

概要

  • 利用者2人のオブジェクトにそれぞれ学籍番号、名前をプロパティとして格納する。
  • フォームの入力内容とは別の情報を併記するためにフォームの入力内容をdataオブジェクトのプロパティとする。

timestampはここで取得せずにバックエンドで追加するという認識であってる?

Lit-innosence commented 1 month ago

timestampを取得することは考えてなかった。 timestampの用途としては

Dot-P commented 1 month ago

前者はロッカー予約をどこで入力させるかによるし、後者もバックエンドで追加する形で問題ないと思うのでjsonから取得する理由は現状ないと思う。

同意見です。timestampはjsonに追加しなくていいかも。

Dot-P commented 1 month ago

あと、nameの姓と名を別にした方がいいと思うんだけどどう? 名前の間のスペースの処理 (全角、半角、スペースなし) が面倒くさいって感じてしまう。

Dot-P commented 1 month ago

あと、上にコード修正の要望を記述しておいたので修正よろしくお願いします。 ざっとの記述になってるから、わからないところがあれば質問してくれると助かります。

Lit-innosence commented 1 month ago

あと、nameの姓と名を別にした方がいいと思うんだけどどう? 名前の間のスペースの処理 (全角、半角、スペースなし) が面倒くさいって感じてしまう。

同意。改善した形式を以下載せます。

Lit-innosence commented 1 month ago

json形式案2(フォーム)

{
    "data": {
        "student1": {
            "student_id": "4622999",
            "last_name": "山田",
            "first_name": "太郎",
        },
        "student2": {
            "student_id": "4623000",
            "last_name": "山田",
            "first_name": "次郎",
        }
    }
}

改善点

Lit-innosence commented 1 month ago

修正内容

修正箇所

テスト状態

Dot-P commented 1 month ago
{
    "data": {
        "main_user": {
            "student_id": "4622999",
            "family_name": "山田",
            "given_name": "太郎",
        },
        "co_user": {
            "student_id": "4623000",
            "family_name": "山田",
            "given_name": "次郎",
        }
    }
}