fix(qa): resolver diagnosticos estaticos, sincronizacion moodle y actualizar docs v3.6.4
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
from app import db
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from typing import TYPE_CHECKING, List, Any
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.models.subject import Subject
|
||||
|
||||
class Career(db.Model):
|
||||
__tablename__ = 'careers'
|
||||
__allow_unmapped__ = True
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
name = db.Column(db.String(150), unique=True, nullable=False, index=True)
|
||||
code = db.Column(db.String(50), nullable=True)
|
||||
description = db.Column(db.Text, nullable=True)
|
||||
created_at = db.Column(db.DateTime, default=datetime.utcnow)
|
||||
created_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc).replace(tzinfo=None))
|
||||
|
||||
# Relationships
|
||||
subjects = db.relationship('Subject', backref='career_obj', lazy=True)
|
||||
subjects: Any = db.relationship('Subject', backref='career_obj', lazy=True)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user