📦 feat(models): add Token model to represent access and refresh tokens
📦 feat(models): add User model to represent user data 📦 feat(models): add UserAddModel, UserListModel, UserPatchModel, and UsersResponse models for user CRUD operations 📦 feat(models): add get_user_by_username and get_user_by_id functions to retrieve user data from the database 📦 feat(models): add update_user function to update user data in the database 📦 feat(models): add update_user_last_login_at function to update the last login timestamp of a user
This commit is contained in:
parent
463831e8df
commit
3d5cf84095
2 changed files with 11 additions and 10 deletions
|
|
@ -1,14 +1,15 @@
|
||||||
from sqlmodel import Field
|
from fastapi import Depends, HTTPException
|
||||||
from uuid import UUID, uuid4
|
from langflow.services.database.models.base import SQLModel, SQLModelSerializable
|
||||||
from pydantic import BaseModel
|
|
||||||
from typing import Optional, List
|
|
||||||
from sqlalchemy.orm import Session
|
|
||||||
from datetime import timezone, datetime
|
|
||||||
from sqlalchemy.exc import IntegrityError
|
|
||||||
from fastapi import HTTPException, Depends
|
|
||||||
|
|
||||||
from langflow.services.utils import get_session
|
from langflow.services.utils import get_session
|
||||||
from langflow.services.database.models.base import SQLModelSerializable, SQLModel
|
from pydantic import BaseModel
|
||||||
|
from sqlalchemy.exc import IntegrityError
|
||||||
|
from sqlalchemy.orm import Session
|
||||||
|
from sqlmodel import Field
|
||||||
|
|
||||||
|
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
from typing import List, Optional
|
||||||
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
|
|
||||||
class User(SQLModelSerializable, table=True):
|
class User(SQLModelSerializable, table=True):
|
||||||
Loading…
Add table
Add a link
Reference in a new issue