Files
Tunnel/app/models/account.py
2025-12-12 10:57:31 +08:00

19 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from sqlalchemy import Column, Integer, String, DateTime, func
from app.core.database import RailwayBase
class Account(RailwayBase):
"""账号表 - railway数据库"""
__tablename__ = "accounts"
id = Column(Integer, primary_key=True, autoincrement=True)
username = Column(String(100), nullable=False, comment="账号")
password = Column(String(100), nullable=False, comment="密码")
status = Column(String(100), nullable=False, default="1", comment="状态: 1-正常, 0-禁用")
today_updated = Column(String(100), default="0", comment="0->待处理1->在抓取2->抓取错误")
project_name = Column(String(100), comment="标段")
created_at = Column(DateTime, nullable=False, server_default=func.now())
updated_at = Column(DateTime, nullable=False, server_default=func.now(), onupdate=func.now())
update_time = Column(String(1000), comment="更新时间跨度")
max_variation = Column(Integer, nullable=False, default=1, comment="变化量的绝对值,单位是毫米")
yh_id = Column(String(100), comment="永恒一号id")