You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
619 B
32 lines
619 B
# -*- coding: utf-8 -*-
|
|
"""数据实体模型"""
|
|
|
|
from dataclasses import dataclass
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class SimulationResult:
|
|
"""模拟结果实体"""
|
|
expression: str
|
|
time_consuming: float
|
|
status: str # 'ok' or 'err'
|
|
timestamp: str
|
|
alpha_id: Optional[str] = None
|
|
message: Optional[str] = None
|
|
|
|
|
|
@dataclass
|
|
class AlphaExpression:
|
|
"""Alpha表达式实体"""
|
|
expression: str
|
|
unused: bool = True
|
|
created_time: Optional[datetime] = None
|
|
|
|
|
|
@dataclass
|
|
class TokenInfo:
|
|
"""认证令牌信息"""
|
|
token: str
|
|
expiry: int |