Initial commit: Audio Dashboard Management System

Made-with: Cursor
This commit is contained in:
yangy
2026-03-04 18:17:34 +08:00
commit 75b1d16453
39 changed files with 3771 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
from sqlalchemy import Column, Integer, String
from database import Base
class Brand(Base):
"""耳机品牌模型"""
__tablename__ = "brand"
__table_args__ = {"comment": "耳机品牌","extend_existing": True}
id = Column(Integer, primary_key=True, autoincrement=True, comment="品牌 ID")
name = Column(String(100), unique=True, nullable=False, comment="品牌名称")
def __repr__(self):
return f"<Brand(id={self.id}, name='{self.name}')>"
def to_dict(self):
"""Convert to dictionary"""
return {
"id": self.id,
"name": self.name
}