Skip to content

제 1회 경남SW경진대회 PnS팀 출품작 - 빠스 백엔드

Notifications You must be signed in to change notification settings

PeopleAndService/BBas-Django-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBas-Django-Backend

ServerClient - Info

  • OS : Ubuntu 20.04
  • CPU : Intel(R) Core(TM) i5-4690 3.0 GHz
  • RAM : 8.0GB
  • MEMORY : SSD 120GB

Structure

image

DB-Schema

Blank diagram (2)

E-R diagram

BBAS_erd

DB-Schema

API-Schema

  • 172.18.3.23:8000/v1/pnsApp/passenger

    172.18.3.23:8000/v1/pnsApp/passenger

    [GET,PUT,DELETE]

    GET - parameter

    {
    	"uid": String(255) (need)
    }
    {
    	"success": true, 
    	"result": {
    		"uid": "String",
    	    "name": "String",
    	    "emergencyPhone": "String,
    	    "cityCode": Integer,
    	    "lfBusOption": Boolean
    						}
    }

    PUT - parameter

    {
    	 "uid":String(255), (need)
         "name": String(20), (option)
       	 "emergencyPhone": String(13), (option)
    	 "cityCode": Integer, (option)
    	 "lfBusOption": Boolean, default = False, (option)
    }
    {
    	"success": true, 
    	"result": {
    		"uid": "String",
       		"name": "String",
            "emergencyPhone": "String,
    	    "cityCode": Integer,
    	    "lfBusOption": Boolean
    		}
    }

    DELETE - parameter

    {
    	"uid" : String(255) (need)
    }
    {
    	"success" : true,
    	"result" : null
    }
  • 172.18.3.23:8000/v1/pnsApp/passengerSign

    172.18.3.23:8000/v1/pnsApp/passengerSign

    [POST]

    POST-parameter

    {
        "uid" : String(255), (need)
        "name" : String(10) (need)
    }
    {
        "success": true,
        "result": {
            "uid": "String",
            "name": "String",
            "emergencyPhone": null,
            "cityCode": null,
            "lfBusOption": false
        }
    }
  • 172.18.3.23:8000/v1/pnsApp/driver

    172.18.3.23:8000/v1/pnsApp/driver

    [GET,PUT,DELETE]

    GET - parameter

    {
    	"did": String(255) (need)
    }
    {
    	"success": true, 
    	"result": {
    		"did": "String",
       		"name": "String",
            "vehicleId": "String",
    	    "busRouteId": "String"
    						}
    }

    PUT - parameter

    {
    	 "did":String(255), (need)
         "name": String(20), (option)
    	 "vehicleId": String(50), (option)
    	 "busRouteId": String(20), (option)
    }
    {
    	"success": true, 
    	"result": {
    		"did": "String",
    		"name": "String",
    	    "vehicleId": "String",
    	    "busRouteId": "String"
    						}
    }

    DELETE - parameter

    {
    	"did" : String(255) (need)
    }
    {
    	"success" : true,
    	"result" : null
    }
  • 172.18.3.23:8000/v1/pnsApp/driverSign

    172.18.3.23:8000/v1/pnsApp/driverSign

    [POST]

    POST-parameter

    {
        "did" : String(255), (need)
        "name" : String(10) (need)
    }
    {
    	"success": true, 
    	"result": {
    		 "did": "String", 
    		 "name": "String", 
    		 "vehicleId": null, 
    		 "busRouteId": null
    						}
    }
  • 172.18.3.23:8000/v1/pnsApp/queue/'uid'

    172.18.3.23:8000/v1/pnsApp/queue/'uid'

    [GET,POST,DELETE]

    GET

    172.18.3.23:8000/v1/pnsApp/queue/uid 값 → uid값의 신청 데이터만 반환 172.18.3.23:8000/v1/pnsApp/queue/0
    → 전체값 반환

    POST - parameter

    172.18.3.23:8000/v1/pnsApp/queue/0

    {
        "stbusStopId": String(50),
        "edbusStopId":String(50),
        "vehicleId":String(50),
        "uid":String(255) / passengerAccount에 존재하는 값이여야 합니다.
    	"stNodeOrder":Integer,
    	"edNodeOrder":Integer,
        "busRouteId" : String(20)
    }
    {
        "success": true,
        "result": {
            "id": Integer,
            "uid": "String",
            "stbusStopId": "String",
            "edbusStopId": "String",
            "vehicleId": "String",
            "boardingCheck": Boolean,
    		"stNodeOrder" : Integer,
    		"edNodeOrder" : Integer,
            "busRouteId" : String
        }
    }

    PUT

    {   
        "uid":String(255),
        "boardingCheck" : Integer
    }
    {
        "success": true,
        "result": {
            "uid": "test",
            "stbusStopId": "JJB381241006",
            "edbusStopId": "JJB381246002",
            "vehicleId": "경남71자5878",
            "boardingCheck": 0,
            "busRouteId": "JJB381012010",
            "stNodeOrder": 40,
            "edNodeOrder": 46
        }
    }

    DELETE

    172.18.3.23:8000/v1/pnsApp/queue/uid값 → 빈JSON 값 반환 { "success": true, "result": {} }

  • 172.18.3.23:8000/v1/pnsApp/queueInfo

    172.18.3.23:8000/v1/pnsApp/queueInfo

    [POST]

    POST

    {
        "cityCode" : String(20),
        "busRouteId" : String(20),
        "vehicleId": String(50)
    }
    Queue에 데이터가 있을 때
    {
        "success": boolean,
        "result" : [
            {
                "stationName" : "String",
                "waiting" : boolean
            }
        ],
        "message"{
            "recentResult" : {
                "stationName" : "String",
                "queueTime" : "String"
            }
        }
    }
    Queue에 데이터가 없을 때
    {
        "success": boolean,
        "result" : [
            {
                "stationName" : "String",
                "waiting" : boolean
            }
        ],
        "message"{}
    }
  • 172.18.3.23:8000/v1/pnsApp/getStationInfo

    172.18.3.23:8000/v1/pnsApp/getStationInfo

    [POST]

    POST

    {
        "gpsLati" : Float,
        "gpsLong" : Float
    }
    {
        "success": boolean,
        "result" : {
                "stationName" : "String",
                "distance" : "String", //meter값으로 반환
                "routeData" : [
                    {
                        "lfBus" : "String",
                        "routeNo" : Integer,
                        "destination" : "String"
                    }
                ]           
        }
    }
  • 172.18.3.23:8000/v1/pnsApp/rating/'did'

    172.18.3.23:8000/v1/pnsApp/rating/'did'

    [POST]

    {
    		"vehicleId": String(50),
    		"ratingData": Double
    }
    {
    		"success" : Boolean,
    		"result" : {}
    }

About

제 1회 경남SW경진대회 PnS팀 출품작 - 빠스 백엔드

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages