Prepare monorepo
This commit is contained in:
parent
a1ddb43ed0
commit
938582155d
61 changed files with 5 additions and 5 deletions
17
backend/app/models/meter_value.py
Normal file
17
backend/app/models/meter_value.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import uuid
|
||||
from sqlalchemy import Uuid, Column, DateTime, Enum, Float, ForeignKey, String
|
||||
|
||||
from app.database import Base
|
||||
from app.schemas.meter_value import Measurand, PhaseType
|
||||
|
||||
class MeterValue(Base):
|
||||
__tablename__ = "meter_values"
|
||||
|
||||
id = Column(Uuid, primary_key=True, default=uuid.uuid4)
|
||||
timestamp = Column(DateTime, index=True)
|
||||
measurand = Column(Enum(Measurand), index=True)
|
||||
phase_type = Column(Enum(PhaseType), nullable=True)
|
||||
unit = Column(String, nullable=True)
|
||||
value = Column(Float)
|
||||
|
||||
transaction_id = Column(String, ForeignKey("transactions.id"), index=True)
|
Loading…
Add table
Add a link
Reference in a new issue