Giter VIP home page Giter VIP logo

ledger_project's Introduction

Ledger Project

Run Server

docker-compose up -d --no-deps --build

Test Django Server

docker-compose run django python manage.py test

API 명세

User

token_info

{
  "access_token": str,
  "refresh_token": str,
  "expires_at": int,
}

user_info

{
  "id": int,
  "email": str,
  "created_at": str,
  "updated_at": str,
}

Users.register

  • 회원가입 API
  • [POST] /users/register/
  • permission_classes : AllowAny

request.body

{  
  "email" : str,
  "password" : str
}

response

{
  "token" : <token_info>,
  "user" : <user_info>
}

Users.Login

  • 로그인 API
  • [POST] /users/login/
  • permission_classes : AllowAny

request.body

{
  "email" : str,
  "password" : str
}

res

{
  "user" : <user_info>,
  "token_info" : <token_info>
}

Users.Logout

  • 로그아웃 API
  • [POST] /users/logout/
  • permission_classes : IsAuthenticated

request.body

{
  "refresh_token" : str,
}

response

{
  "result" : True,
}

Ledger

ledger_info

{
  "id": int,
  "user": int,
  "memo": str,
  "amount": int,
  "created_at": str,
  "updated_at": str,
  "is_active": bool,
}

[POST] ledegers

  • 금액, 메모 작성
  • [POST] /ledgers/
  • permission_classes : IsAuthenticated

request.body

{
  "amount" : int, // biginteger field
  "memo" : str
}

response

{
  "result" : bool,
  "ledgers" : <ledger_info>
}

[PATCH] ledgers.pk

  • 수정기능
  • [PATCH] /ledgers/<ledger_id>/
  • permission_classes : IsAuthenticated

request.body

{
  "amount" : int, // nullable
  "memo" : str // nullable
}

response

{
  "result" : bool,
  "ledgers" : ledger_info
}

[DELETE] ledgers.pk

  • 삭제기능
  • [DELETE] /ledgers/<ledger_id>/
  • permission_classes : IsAuthenticated

request.body

{

}

response

{
  "result" : bool,
  "ledgers" : <ledger_info>
}

[PATCH] ledgers.pk.restore

  • 복구기능
  • [PATCH] /ledgers/<ledger_id>/restore/
  • permission_classes : IsAuthenticated

request.body

{

}

response

{
  "result" : bool,
  "ledgers" : <ledger_info>
}

[GET] ledgers

  • 가계부 리스트 보는 기능
    • 추가기능(해당 유저의 가계부만 보이게 구현)
  • [GET] /ledgers/
  • permission_classes : IsAuthenticated

request.body

{

}

response

{
  "result" : bool,
  "ledgers" : [<ledger_info>]
}

[GET] ledgers.pk

  • 가계부 세부내역 보는 기능
    • 추가기능(해당 유저의 가계부만 보이게 구현)
  • [GET] /ledgers/<ledger_id>/
  • permission_classes : IsAuthenticated

request.body

{

}

response

{
  "result" : bool,
  "ledgers" : <ledger_info>
}

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.