Prepare monorepo
This commit is contained in:
parent
a1ddb43ed0
commit
938582155d
61 changed files with 5 additions and 5 deletions
16
backend/app/models/id_token.py
Normal file
16
backend/app/models/id_token.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import uuid
|
||||
from sqlalchemy import Uuid, Boolean, Column, ForeignKey, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app.database import Base
|
||||
|
||||
class IdToken(Base):
|
||||
__tablename__ = "id_tokens"
|
||||
|
||||
id = Column(Uuid, primary_key=True, default=uuid.uuid4)
|
||||
friendly_name = Column(String)
|
||||
is_active = Column(Boolean, default=True)
|
||||
token = Column(String, index=True)
|
||||
|
||||
owner_id = Column(Uuid, ForeignKey("users.id"))
|
||||
owner = relationship("User", back_populates="id_tokens")
|
Loading…
Add table
Add a link
Reference in a new issue