Initial Commit
This commit is contained in:
25
api/app/models/vmware/reports/capacity/frame.py
Normal file
25
api/app/models/vmware/reports/capacity/frame.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Column, Integer, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from models.common.base import BaseModel
|
||||
|
||||
|
||||
class frame(BaseModel):
|
||||
__tablename__ = "tvrc_frames"
|
||||
_s_collection_name = "frames"
|
||||
http_methods = {"get", "post", "delete"}
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True, index=True)
|
||||
timestamp = Column(
|
||||
DateTime,
|
||||
default=datetime.utcnow,
|
||||
onupdate=datetime.utcnow
|
||||
)
|
||||
|
||||
capacity = relationship(
|
||||
"capacity",
|
||||
backref="frame",
|
||||
cascade="save-update, delete"
|
||||
)
|
||||
Reference in New Issue
Block a user