Initial commit - Migrated to Dev environment
This commit is contained in:
1
code-server-config/data/User/History/-1e547221/entries.json
Executable file
1
code-server-config/data/User/History/-1e547221/entries.json
Executable file
@@ -0,0 +1 @@
|
||||
{"version":1,"resource":"vscode-remote://192.168.100.43:8443/home/coder/project/backend/app/models/logistics.py","entries":[{"id":"thOH.py","timestamp":1769032595982}]}
|
||||
25
code-server-config/data/User/History/-1e547221/thOH.py
Executable file
25
code-server-config/data/User/History/-1e547221/thOH.py
Executable file
@@ -0,0 +1,25 @@
|
||||
from sqlalchemy import Column, Integer, String, Enum
|
||||
from app.db.base import Base
|
||||
import enum
|
||||
|
||||
# Enum definiálása
|
||||
class LocationType(str, enum.Enum):
|
||||
stop = "stop" # Megálló / Parkoló
|
||||
warehouse = "warehouse" # Raktár
|
||||
client = "client" # Ügyfél címe
|
||||
|
||||
class Location(Base):
|
||||
__tablename__ = "locations"
|
||||
__table_args__ = {"schema": "data"}
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String, nullable=False)
|
||||
|
||||
# FONTOS: Itt is megadjuk a schema="data"-t, hogy ne a public sémába akarja írni!
|
||||
type = Column(Enum(LocationType, schema="data", name="location_type_enum"), nullable=False)
|
||||
|
||||
# Koordináták (egyelőre String, később PostGIS)
|
||||
coordinates = Column(String, nullable=True)
|
||||
address_full = Column(String, nullable=True)
|
||||
|
||||
capacity = Column(Integer, nullable=True)
|
||||
Reference in New Issue
Block a user