meeting_info.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from sqlalchemy import Column, Integer, String, ForeignKey, TIMESTAMP
  2. from sqlalchemy.orm import relationship
  3. from app.db.session import Base
  4. class MeetingInfo(Base):
  5. __tablename__ = "meetings_info"
  6. id = Column(String, primary_key=True, index=True)
  7. initiator_id = Column(String, ForeignKey("tenantslink_users.id"))
  8. room_id = Column(String, ForeignKey("meeting_rooms_info.id"))
  9. start_time = Column(TIMESTAMP)
  10. end_time = Column(TIMESTAMP)
  11. topic = Column(String)
  12. status = Column()
  13. initiator = relationship("TenantslinkUser", back_populates="meetings_info")
  14. room = relationship("MeetingRoom", back_populates="meetings_info")
  15. class MeetingRoom(Base):
  16. __tablename__ = "meeting_rooms_info"
  17. id = Column(String, primary_key=True, index=True)
  18. name = Column(String)
  19. location = Column(String)
  20. category = Column(String)
  21. seat_count = Column(Integer)
  22. class MeetingAttendee(Base):
  23. __tablename__ = "meeting_attendees"
  24. meeting_id = Column(String, index=True)
  25. user_id = Column(String, index=True)
  26. class TenantslinkUser(Base):
  27. __tablename__ = "tenantslink_users"
  28. id = Column(String, primary_key=True, index=True)
  29. name = Column(String)