Initial Commit
This commit is contained in:
38
api/app/models/vmware/reports/mmhosts/report.py
Normal file
38
api/app/models/vmware/reports/mmhosts/report.py
Normal file
@@ -0,0 +1,38 @@
|
||||
from sqlalchemy import (
|
||||
Column,
|
||||
String,
|
||||
Integer,
|
||||
DateTime,
|
||||
ForeignKey
|
||||
)
|
||||
|
||||
from models.common.base import BaseModel
|
||||
|
||||
|
||||
class maintenance(BaseModel):
|
||||
__tablename__ = "tvrm_report"
|
||||
_s_collection_name = "maintenance"
|
||||
|
||||
http_methods = {"get", "post", "delete"}
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True, index=True)
|
||||
folder = Column(String(255), nullable=False)
|
||||
hostname = Column(String(64), unique=True, nullable=False)
|
||||
state = Column(String(64), index=True)
|
||||
reason = Column(String(255))
|
||||
placedby = Column(String(64))
|
||||
placedbyFN = Column(String(64))
|
||||
date = Column(DateTime)
|
||||
|
||||
vcenter_id = Column(
|
||||
Integer,
|
||||
ForeignKey("tvc_vcenters.id"),
|
||||
nullable=False,
|
||||
index=True
|
||||
)
|
||||
cluster_id = Column(
|
||||
Integer,
|
||||
ForeignKey("tvc_clusters.id"),
|
||||
nullable=True,
|
||||
index=True
|
||||
)
|
||||
Reference in New Issue
Block a user