
- Set up project structure with modular organization - Implement database models for users, organizations, clients, invoices - Create Alembic migration scripts for database setup - Implement JWT-based authentication and authorization - Create API endpoints for users, organizations, clients, invoices - Add PDF generation for invoices using ReportLab - Add comprehensive documentation in README
22 lines
710 B
Python
22 lines
710 B
Python
from sqlalchemy import Column, String, Text
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base_class import Base
|
|
|
|
class Organization(Base):
|
|
name = Column(String, index=True, nullable=False)
|
|
address = Column(Text)
|
|
city = Column(String)
|
|
state = Column(String)
|
|
postal_code = Column(String)
|
|
country = Column(String)
|
|
phone = Column(String)
|
|
email = Column(String)
|
|
website = Column(String)
|
|
tax_id = Column(String)
|
|
logo_url = Column(String)
|
|
|
|
# Relationships
|
|
users = relationship("User", back_populates="organization")
|
|
clients = relationship("Client", back_populates="organization")
|
|
invoices = relationship("Invoice", back_populates="organization") |