初始化鸿蒙应用展示平台项目 - 前后端分离架构

This commit is contained in:
Nvex
2025-10-25 11:45:17 +08:00
commit c0f81dbbe2
92 changed files with 40210 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from sqlalchemy import Column, String, Integer, BigInteger, DateTime, DECIMAL, ForeignKey
from sqlalchemy.sql import func
from app.database import Base
class AppMetrics(Base):
__tablename__ = "app_metrics"
id = Column(BigInteger, primary_key=True, autoincrement=True)
app_id = Column(String(50), ForeignKey("app_info.app_id", ondelete="CASCADE"), nullable=False, index=True)
pkg_name = Column(String(255), ForeignKey("app_info.pkg_name", ondelete="CASCADE"), nullable=False, index=True)
version = Column(String(50), nullable=False)
size_bytes = Column(BigInteger, nullable=False)
download_count = Column(BigInteger, nullable=False, index=True)
release_date = Column(BigInteger, nullable=False)
created_at = Column(DateTime, nullable=False, server_default=func.now(), index=True)