-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
557 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from nonebot.exception import NoneBotException | ||
|
||
|
||
class MarisaException(NoneBotException): | ||
"""异常基类""" | ||
|
||
|
||
class ItemNotFoundError(MarisaException): | ||
"""物品未找到异常""" | ||
|
||
def __init__(self, item_id: int) -> None: | ||
self.item_id = item_id | ||
|
||
def __repr__(self) -> str: | ||
return f"ItemNotFoundError(item_id={self.item_id})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"""first revision | ||
迁移 ID: 6bf5eefd0cbd | ||
父迁移: 0cdb9777e97d | ||
创建时间: 2025-01-22 19:22:54.513452 | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from collections.abc import Sequence | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
revision: str = "6bf5eefd0cbd" | ||
down_revision: str | Sequence[str] | None = "0cdb9777e97d" | ||
branch_labels: str | Sequence[str] | None = None | ||
depends_on: str | Sequence[str] | None = None | ||
|
||
|
||
def upgrade(name: str = "") -> None: | ||
if name: | ||
return | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("backpack", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("is_bundle", sa.Boolean(), nullable=False)) | ||
batch_op.add_column(sa.Column("is_equipped", sa.Boolean(), nullable=False)) | ||
batch_op.drop_column("item_amount") | ||
batch_op.drop_column("item_type") | ||
batch_op.drop_column("bundle_item_amount") | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(name: str = "") -> None: | ||
if name: | ||
return | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("backpack", schema=None) as batch_op: | ||
batch_op.add_column( | ||
sa.Column("bundle_item_amount", sa.INTEGER(), nullable=False) | ||
) | ||
batch_op.add_column(sa.Column("item_type", sa.VARCHAR(), nullable=False)) | ||
batch_op.add_column(sa.Column("item_amount", sa.INTEGER(), nullable=False)) | ||
batch_op.drop_column("is_equipped") | ||
batch_op.drop_column("is_bundle") | ||
|
||
# ### end Alembic commands ### |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.