123456789101112131415161718192021 |
- """
- Defines the database schema for the backend.
- """
- from sqlalchemy import Column, Integer, String
- from sqlalchemy.ext.declarative import declarative_base
- BASE = declarative_base()
- class Person(BASE):
- ''' Represents a person to be shown on the lists. '''
- __tablename__ = 'people'
- person_id = Column(Integer, primary_key=True)
- name = Column(String, nullable=False)
- def __repr__(self):
- return f"<Person(id={self.person_id}, name={self.name})>"
|