<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                在具體編碼以前我們根據前面的手繪原型,做以下兩方面的基礎工作: # 預期效果 ![](https://img.kancloud.cn/1f/de/1fde9a82465b0fc50cbeb15cf0a561e4_733x309.gif) ## ER圖 ![](https://img.kancloud.cn/ec/6d/ec6d6bc7d3ed87a7975f7df3e62c212c_650x153.png) ## 定義接口 ``` POST /Student ``` #### 參數 Parameters | type | name | Description | Schema | | --- | --- | --- | --- | | **Body** | **學生** <br> *requried* | 學生信息 | Student | #### 返回值 Responses | HTTP Code | Description | Schema | | --- | --- | --- | | **201** | Created | 學生信息 | ##### 學生信息 | name | type | description | | --- | --- | --- | | name <br> *requried?* | string(2-20)? | 學生名稱 | | sno <br> *requried unique?* | string(6) | 學號 | | klass <br> *requried* | {id: Long} | 班級 | * ? 增加了約束條件,即此項必須傳入否則報錯。 * ? 限制了長度范圍,長度不符合要求將報錯。 * ? 規定此項應該是唯一的,如果重復則報錯。 是否對某些字段進行約束以及如何約束并沒有定論,這更多的應該依據項目的實際情況。比如在我們的項目中通過調研我們確認:學生的名字最少為2個字符、最長的也不會超過20個字符;學號是唯一的,不存在兩個學號重復的學生,而且必須唯一,同時其長度固定為6位;學生必須處于某個班級中,不存在沒有設置班級的學生。依據上述調研信息,我們制定了更符合實現的傳入規范,這將避免一些人為的非正常數據給我們系統帶來的確定風險。在一定程度上規避了一些“在我這好好的”的“莫名”問題的產生。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看