初始化

This commit is contained in:
lhx
2025-12-12 10:57:31 +08:00
commit f8e85beba1
38 changed files with 2146 additions and 0 deletions

18
app/models/account.py Normal file
View File

@@ -0,0 +1,18 @@
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")