Git Product home page Git Product logo

b-restful-api-design-homework's Introduction

实现一个学生管理系统的后端API

通过该系统的API,客户端可以新增、删除、查询、更新学生信息,对学生进行分组、查询和更新分组信息

API规范

使用Restful风格的API

需求列表(Version V1)

  1. 新增和删除学生
  2. 查询学生的列表,可以通过性别进行筛选,筛选条件不是必须的
  3. 查询单个学生的信息
  4. 更新学生的信息,可以更新除学号外的所有信息
  5. 对学生进行随机分组,分组规则为:共6组,学员平均分配到每组。有剩余时,从 Team 1 开始依次再分配。例如:当学员总数为 8 人时,最终分配结束后的每组人数为:2,2,1,1,1,1;
  6. 更新组名
  7. 查询分组列表

数据模型

学生的信息包含以下字段

  • id 学号
  • name 姓名
  • gender 性别
  • note 备注信息

小组的信息包含以下字段

  • id 组号
  • name 组名
  • note 备注

注意事项

  1. 数据存储在内存中
  2. 提交前请使用curl或postman测试

b-restful-api-design-homework's People

Contributors

liaowenqiang828 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.