```
refactor(core,ai): 调整模块导入路径并移除废弃文件 - 修复 scheduler.py 中的导入路径错误,将 reports.service 改为 reports.services - 移除废弃的 app/core/background/task_queue.py 文件 - 移除废弃的 app/modules/ai_agent/adapters.py 文件 - 修复 ai_memory/service.py 中的导入路径错误,将 events.service 改为 events.services ```
This commit is contained in:
30
app/modules/business/models/suppliers.py
Normal file
30
app/modules/business/models/suppliers.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from sqlalchemy import Integer, Numeric, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
from app.modules.business.constants import (
|
||||
RiskLevel,
|
||||
StatusValue,
|
||||
)
|
||||
from app.modules.business.models.common import TimestampMixin
|
||||
|
||||
|
||||
class Supplier(Base, TimestampMixin):
|
||||
__tablename__ = "suppliers"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
code: Mapped[str] = mapped_column(String(64), unique=True, index=True)
|
||||
name: Mapped[str] = mapped_column(String(255), index=True)
|
||||
category: Mapped[str | None] = mapped_column(String(128), nullable=True, index=True)
|
||||
contact: Mapped[str | None] = mapped_column(String(128), nullable=True)
|
||||
quality_score: Mapped[Decimal] = mapped_column(Numeric(5, 2), default=0)
|
||||
delivery_score: Mapped[Decimal] = mapped_column(Numeric(5, 2), default=0)
|
||||
price_score: Mapped[Decimal] = mapped_column(Numeric(5, 2), default=0)
|
||||
risk_level: Mapped[str] = mapped_column(String(32), default=RiskLevel.LOW, index=True)
|
||||
blacklist_status: Mapped[str] = mapped_column(
|
||||
String(32),
|
||||
default=StatusValue.NORMAL,
|
||||
index=True,
|
||||
)
|
||||
Reference in New Issue
Block a user