mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 13:52:43 +08:00
23 lines
759 B
Python
23 lines
759 B
Python
from sqlalchemy import Column, DateTime, Integer, String, text
|
|
from storage.base import Base
|
|
|
|
|
|
class JiraUser(Base): # type: ignore
|
|
__tablename__ = 'jira_users'
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
keycloak_user_id = Column(String, nullable=False, index=True)
|
|
jira_user_id = Column(String, nullable=False, index=True)
|
|
jira_workspace_id = Column(Integer, nullable=False, index=True)
|
|
status = Column(String, nullable=False)
|
|
created_at = Column(
|
|
DateTime,
|
|
server_default=text('CURRENT_TIMESTAMP'),
|
|
nullable=False,
|
|
)
|
|
updated_at = Column(
|
|
DateTime,
|
|
server_default=text('CURRENT_TIMESTAMP'),
|
|
onupdate=text('CURRENT_TIMESTAMP'),
|
|
nullable=False,
|
|
)
|