Files
ns2.0/backend/app/models/app_info.py
Nvex 720402ffe7 feat: NEXT Store 2.0 重大更新 - 完整重构前后端
🎉 主要更新:

后端:
- 全新华为应用市场爬虫系统
- 三表分离数据库设计 (app_info, app_metrics, app_rating)
- 完整的API接口 (搜索、分类、热门、上新等)
- 元服务自动识别和分类
- 智能Token管理和数据处理
- 修复热门应用重复显示问题

前端:
- 全新首页设计 (今日上架、热门应用)
- 应用页面 (彩色分类磁贴、智能图标匹配)
- 今日上新页面 (日期切换)
- 热门应用页面 (卡片布局)
- 应用详情页面 (完整信息展示)
- Apple风格搜索栏
- Footer组件
- 底部导航栏优化 (4个导航项)
- 骨架屏加载效果
- FontAwesome图标集成

UI/UX:
- 统一浅色背景 (#F5F5F7)
- 流畅的过渡动画
- 响应式设计
- 毛玻璃效果

文档:
- CHANGELOG.md - 完整更新日志
- QUICKSTART.md - 快速开始
- 多个技术文档和使用指南

版本: v2.0.0
2025-10-25 21:20:32 +08:00

56 lines
2.0 KiB
Python

from sqlalchemy import Column, String, Integer, Text, DateTime, Boolean, JSON, BigInteger
from sqlalchemy.sql import func
from app.database import Base
class AppInfo(Base):
__tablename__ = "app_info"
# 基本信息
app_id = Column(String(50), primary_key=True)
name = Column(String(255), nullable=False, index=True)
pkg_name = Column(String(255), nullable=False, unique=True, index=True)
# 开发者信息
developer_name = Column(String(255), nullable=False, index=True)
dev_id = Column(String(100), nullable=True)
supplier = Column(String(255), nullable=True)
# 分类信息
kind_name = Column(String(100), nullable=False, index=True)
kind_id = Column(String(50), nullable=True)
tag_name = Column(String(100), nullable=True)
# 展示信息
icon_url = Column(Text, nullable=False)
brief_desc = Column(Text, nullable=False)
description = Column(Text, nullable=False)
# 隐私和政策
privacy_url = Column(Text, nullable=True)
# 价格和支付
is_pay = Column(Boolean, default=False)
price = Column(String(50), nullable=True, default='0')
# 时间信息
listed_at = Column(DateTime, nullable=False)
# 设备支持
main_device_codes = Column(JSON, nullable=True) # 支持的设备类型
# SDK信息
target_sdk = Column(String(50), nullable=True)
min_sdk = Column(String(50), nullable=True)
compile_sdk_version = Column(Integer, nullable=True)
min_hmos_api_level = Column(Integer, nullable=True)
api_release_type = Column(String(50), nullable=True, default='Release')
# 其他信息
ctype = Column(Integer, nullable=True)
app_level = Column(Integer, nullable=True)
packing_type = Column(Integer, nullable=True)
# 系统字段
created_at = Column(DateTime, nullable=False, server_default=func.now())
updated_at = Column(DateTime, nullable=False, server_default=func.now(), onupdate=func.now())