This commit is contained in:
yo3ef 2023-01-12 13:19:18 +03:30
parent c7c0f7536d
commit 96666520e1
23 changed files with 3 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,5 @@
import datetime
from fastapi import HTTPException
from sqlalchemy import update
from sqlalchemy.orm import Session
@ -56,6 +58,7 @@ class AutoController:
@staticmethod
def create(db: Session, _model: str, _input: dict):
m = model_name_to_class(_model)
_input['created_at'] = datetime.datetime.now()
obj = m(**_input)
db.add(obj)
db.commit()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.