Giter VIP home page Giter VIP logo

couponapi's Introduction

Coupon API

  • 라라벨 프로젝트를 이용하여 API 2개를 만들어주세요.
  • 하나는 유저가 10만명이 있다고 할 때 각 유저에게 쿠폰을 생성해서 이메일/문자를 발송하는 API입니다.
  • 또 하나는 유저가 쿠폰을 다운받는 API입니다.

실행

DB migration

php artisan migrate

DB 더미 데이터 추가

php artisan db:seed

서비스 실행

php artisan serve

테스트

php artisan test

Api

  1. 각 유저에게 쿠폰 생성

    • [POST] /user_coupon
    • data : ['coupon_id' : 1] // 할당 할 쿠폰 id
      • ex ) localhost:8000/api/user_coupon?coupon_id=1
    • return 값
      • {"ok": "Success"}
  2. 유저가 쿠폰 다운로드

    • [POST] /user_coupon/download
    • data : ['user_id' : 1, 'coupon_id' : 1] // 유저 id 와 할당 할 쿠폰 id
      • ex ) localhost:8000/api/user_coupon/download?coupon_id=1&user_id=1
    • return 값:
      • {"ok": "Success", "code": "XwqY-ZZSu-LiTH-sKux"}

ERD

erd

couponapi's People

Contributors

blueforest529 avatar

Watchers

James Cloos avatar  avatar

couponapi's Issues

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.