from typing import Optional, List

from sqlalchemy import String
from sqlalchemy.sql.schema import Column
from sqlmodel import SQLModel, Field, Relationship


class CustomerProductLink(SQLModel, table=True):
    customer_id: Optional[int] = Field(
        default=None, foreign_key='customer.id', primary_key=True
    )
    product_id: Optional[int] = Field(
        default=None, foreign_key='product.id', primary_key=True
    )


class AddressBase(SQLModel):
    street_name: str
    house_number: str
    city: str
    zip_code: str


class Address(AddressBase, table=True):
    id: int = 