dbilayer_oracle/reqhandlers/dbplanbilling.py

91 lines
2.5 KiB
Python
Raw Permalink Normal View History

2023-05-15 18:06:03 +05:30
from flask import Blueprint, request, jsonify
from core.bll import bllengine
from flask_cors import cross_origin
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
from reqhandlers.blocklist import BLOCKLIST
import datetime
from datetime import timedelta
dbplanbilling = Blueprint('dbplanbilling', __name__)
@dbplanbilling.route('/dbplanbilling/reqtest')
def retest():
return "success"
# 1.1. Create
@dbplanbilling.route('/dbplanbilling/create', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def createdbplanbilling():
req = request.json
resp = bllengine.dbplanbilling_processcreate(req)
return jsonify(resp)
# 1.2. Read One Conditional
@dbplanbilling.route('/dbplanbilling/readonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def readOnedbplanbillingwithCondition():
req = request.json
resp = bllengine.dbplanbilling_processreadonecond(req)
return jsonify(resp)
# 1.3. Read Multiple Conditional
@dbplanbilling.route('/dbplanbilling/readmanycond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def reaManydbplanbillingwithCond():
req = request.json
resp = bllengine.dbplanbilling_processreadmanycond(req)
return jsonify(resp)
# 1.4. Read All
@dbplanbilling.route('/dbplanbilling/readall', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def readManydbplanbillingwithoutCond():
req = request.json
resp = bllengine.dbplanbilling_processreadmanywithoutcond(req)
return jsonify(resp)
# 1.5. Delete One Conditional
@dbplanbilling.route('/dbplanbilling/deleteonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def deleteOnedbplanbillingwithcondition():
req = request.json
resp = bllengine.dbplanbilling_processdeleteonecond(req)
return jsonify(resp)
# 1.6. Update One Conditional
@dbplanbilling.route('/dbplanbilling/updateonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def updateonedbplanbillingwithcondition():
req = request.json
resp = bllengine.dbplanbilling_processupdateonecond(req)
return jsonify(resp)
""""# 1.7. Update All
@dbplanbilling.route('/dbplanbilling/updateall', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def createdbplanbilling():
req = request.json
resp = bllengine.dbplanbilling_processupdateall(req)
return jsonify(resp)
"""