Location>code7788 >text

How different teams implemented the login system (just for fun)

Popularity:198 ℃/2024-11-16 21:03:18

One day ceo needed a login system and found a development team.

Team Control Freak

The leader ordered a cappuccino, opened his slim mac book, clicked on the word document, and began to write:

1. Project background
2. Terminology Analysis
3. Data Table Design
  3.1 user table
  3.2 Role table
  。。。。。。
4. api design
  4.1 User information api
  4.2 Login api
  。。。。。。

The leader refills his mocha and continues to write

3.1 user table

field typology
user_id varchar(10)
email varchar(255)
password varchar(255)
registration_date timestamp
create_at timestamp
create_by varchar(10)
update_at timestamp
update_by varchar(10)

3.2 Role table

field typology note
id int
user_id varchar(10)
Role varchar(30) admin / normal
create_at timestamp
create_by varchar(10)
update_at timestamp
update_by varchar(10)

。。。。。

The leader's a little hungry, so I ordered a Cocoa Oreo dirty towel roll, and I'm going to continue writing.

4.1 User information api

request response
GET /user_query?user_id=xxx { "user_id": "xxx", "password": "xxxx"}

4.2 Login api

request response
POST /user_login {"user_id": "xxx", "password": "xxxx"} { "success": true / false}

。。。。。。

The next day, the leader called the programmers and gave them a word document.

The obedient programmers worked overtime to write the implementation in c#:

/// Don't ask me why the field naming is not standardized, I'm just a wage earner with an 80 year old mother and a 3 year old child.
/// Leader: 1. we need to strictly follow the db specification
/// Leader: 2. json needs to be harmonized with db
/// LEADER: 3. therefore, no language or framework can affect the specification

public class UserInfo
public class UserInfo {
  public string user_id {get;set;}
 public string password {get;set;}
 public DateTime registration_date {get;set;}
 public string create_by {get;set;}
 public DateTime create_at {get;set;}
 public string update_at {get;set;}
 public DateTime update_at {get;set;}
 .....
}

public class UserInfoController
{
  [HttpGet("user_login")]
  public UserInfo GetUser(UserInfo user)
  {
      ......
  }

  [HttpPost("user_query")]
  public UserInfo GetUser(string user_id)
  {
      ......
  }
}

local tycoon team

The leader ordered his cappuccino, opened his slim mac book, and clicked on the auth0 website

Looked at the features and was happy with them

Looking at the price, it's not too expensive

The next day, the boss asked for hr.

In the afternoon, so-and-so, who's been on the job for a year, packed his bags and went home.

Team Zeitgeist

The leader ordered the cappuccino, opened his slim mac book, and clicked on chatgpt

hello chatgpt, help me to design a login system
chatgpt : in progress 。。。。

The next day, the leader called the programmers and gave them a word document.

The obedient programs also clicked on chatgpt

hello chatgpt, help me to realize a login system according to this word document
chatgpt : in progress 。。。。