22 lines
561 B
Python
22 lines
561 B
Python
from datetime import datetime
|
|
from sqlalchemy import Column, String, Integer, DateTime
|
|
|
|
from models.common.base import BaseModel
|
|
|
|
|
|
class timestamp(BaseModel):
|
|
"""
|
|
description: Timestamps.
|
|
"""
|
|
__tablename__ = "tcc_timestamps"
|
|
_s_collection_name = "timestamps"
|
|
_s_class_name = "timestamps"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, index=True)
|
|
name = Column(String(64), unique=True, nullable=False)
|
|
timestamp = Column(
|
|
DateTime,
|
|
default=datetime.utcnow,
|
|
onupdate=datetime.utcnow
|
|
)
|