init project_supervisor app
This commit is contained in:
parent
382bea2a21
commit
2a846d4394
@ -1,7 +1,9 @@
|
||||
from flask import Blueprint
|
||||
from .coordinator.routes import bp as coordinator_bp
|
||||
from .project_supervisor.routes import bp as project_supervisor_bp
|
||||
|
||||
api_bp = Blueprint('api', __name__, url_prefix='/api')
|
||||
|
||||
# register blueprints here
|
||||
api_bp.register_blueprint(coordinator_bp)
|
||||
api_bp.register_blueprint(project_supervisor_bp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
from apiflask import APIBlueprint
|
||||
from flask import Blueprint
|
||||
|
||||
from .students import bp as students_bp
|
||||
|
||||
bp = APIBlueprint("coordinator", __name__, url_prefix="/coordinator")
|
||||
bp = Blueprint("coordinator", __name__, url_prefix="/coordinator")
|
||||
|
||||
bp.register_blueprint(students_bp)
|
||||
|
@ -1,9 +1,10 @@
|
||||
from factory import alchemy, Sequence, RelatedFactory, LazyAttribute
|
||||
from factory import alchemy, Sequence
|
||||
from factory.faker import Faker
|
||||
from factory.fuzzy import FuzzyInteger, FuzzyChoice
|
||||
|
||||
from .dependencies import db
|
||||
from .students.models import Student, Group, ProjectSupervisor
|
||||
from .students.models import Student, Group
|
||||
from .project_supervisor.models import ProjectSupervisor
|
||||
|
||||
|
||||
class ProjectSupervisorFactory(alchemy.SQLAlchemyModelFactory):
|
||||
|
0
backend/app/project_supervisor/__init__.py
Normal file
0
backend/app/project_supervisor/__init__.py
Normal file
10
backend/app/project_supervisor/models.py
Normal file
10
backend/app/project_supervisor/models.py
Normal file
@ -0,0 +1,10 @@
|
||||
from ..dependencies import db
|
||||
from ..base.models import Person, Base
|
||||
|
||||
|
||||
class ProjectSupervisor(Base, Person):
|
||||
__tablename__ = "project_supervisors"
|
||||
|
||||
limit_group = db.Column(db.Integer, default=1, nullable=False)
|
||||
count_groups = db.Column(db.Integer, default=1)
|
||||
mode = db.Column(db.Boolean, default=True, nullable=False) # True - stationary, False - non-stationary
|
7
backend/app/project_supervisor/routes/__init__.py
Normal file
7
backend/app/project_supervisor/routes/__init__.py
Normal file
@ -0,0 +1,7 @@
|
||||
from flask import Blueprint
|
||||
|
||||
from .groups import bp as bp_group
|
||||
|
||||
bp = Blueprint("project_supervisor", __name__, url_prefix="/project_supervisor")
|
||||
|
||||
bp.register_blueprint(bp_group)
|
1
backend/app/project_supervisor/schemas.py
Normal file
1
backend/app/project_supervisor/schemas.py
Normal file
@ -0,0 +1 @@
|
||||
|
@ -6,14 +6,6 @@ from ..base.models import Person, Base
|
||||
from ..base.utils import order_by_column_name
|
||||
|
||||
|
||||
class ProjectSupervisor(Base, Person):
|
||||
__tablename__ = "project_supervisors"
|
||||
|
||||
limit_group = db.Column(db.Integer, default=1, nullable=False)
|
||||
count_groups = db.Column(db.Integer, default=1)
|
||||
mode = db.Column(db.Boolean, default=True, nullable=False) # True - stationary, False - non-stationary
|
||||
|
||||
|
||||
class Group(Base):
|
||||
__tablename__ = "groups"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user