initial (empty) blueprint and model
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
86edb246bf
commit
2b0cb0d49c
28
ki/resume.py
Normal file
28
ki/resume.py
Normal file
@ -0,0 +1,28 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp_resume = Blueprint('resume', __name__,
|
||||
template_folder='templates')
|
||||
|
||||
@bp_resume.route('/')
|
||||
@token_auth
|
||||
def show(page):
|
||||
"""
|
||||
return the list of resumes as object with data array inside
|
||||
"""
|
||||
return jsonify()
|
||||
|
||||
@bp_resume.route("/<resume_id>")
|
||||
@token_auth
|
||||
def get_resume(resume_id):
|
||||
"""
|
||||
lookup for resume with resume_id, check if its from this user and provide its contents
|
||||
in the appropriate format
|
||||
shall support 'format' parameter with values of 'html', 'pdf'
|
||||
if no parameter is given, json is returned
|
||||
"""
|
||||
return jsonify(
|
||||
id=resume_id
|
||||
)
|
||||
|
||||
|
||||
|
23
ki/resume_models.py
Normal file
23
ki/resume_models.py
Normal file
@ -0,0 +1,23 @@
|
||||
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Boolean, Column, Integer, SmallInteger, String, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app import db
|
||||
|
||||
|
||||
class Resume(db.Model):
|
||||
__tablename__ = 'resume'
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
profile_id = Column(Integer, ForeignKey("profile.id"), nullable=True)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
'profile_id': profile_id
|
||||
}
|
Loading…
Reference in New Issue
Block a user