from typing import Optional
from sqlmodel import Field, SQLModel
from datetime import datetime


class Meter(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    serial_number: str


class Measurement(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    meter_id: Optional[int] = 