mirror of
https://github.com/veops/cmdb.git
synced 2025-08-09 03:47:51 +08:00
v1 vsersion
This commit is contained in:
20
models/ci.py
Normal file
20
models/ci.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import datetime
|
||||
|
||||
from extensions import db
|
||||
|
||||
|
||||
class CI(db.Model):
|
||||
__tablename__ = "cis"
|
||||
|
||||
ci_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
uuid = db.Column(db.String(32), nullable=False)
|
||||
type_id = db.Column(db.Integer,
|
||||
db.ForeignKey("ci_types.type_id"),
|
||||
nullable=False)
|
||||
ci_type = db.relationship("CIType", backref="cis")
|
||||
status = db.Column(db.String(8),
|
||||
db.Enum("review", "validate", name="stauts"))
|
||||
created_time = db.Column(db.DateTime, default=datetime.datetime.now())
|
||||
heartbeat = db.Column(db.DateTime, default=datetime.datetime.now())
|
Reference in New Issue
Block a user