初步迁移数据库

This commit is contained in:
2025-09-28 11:49:26 +08:00
parent 6c512805e8
commit db77d6033b
20 changed files with 249 additions and 153 deletions

View File

@@ -2,11 +2,9 @@
from typing import Literal, Optional, TYPE_CHECKING
from sqlmodel import Field, Column, SQLModel, String, DateTime
from .base import BaseModel
from .base import TableBase, IdMixin
from datetime import datetime
from .base import BaseModel
"""
原建表语句:
@@ -26,7 +24,7 @@ CREATE TABLE IF NOT EXISTS fr_objects (
if TYPE_CHECKING:
pass
class Object(SQLModel, BaseModel, table=True):
class Object(IdMixin, TableBase, table=True):
__tablename__ = 'fr_objects'
key: str = Field(index=True, nullable=False, description="物品外部ID")