19 lines
1.1 KiB
Python
19 lines
1.1 KiB
Python
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")
|