Files
telegram-management-system/init-telegram-users.sh
你的用户名 237c7802e5
Some checks failed
Deploy / deploy (push) Has been cancelled
Initial commit: Telegram Management System
Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 15:37:50 +08:00

38 lines
1.0 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Initialize Telegram Users Table and Sample Data
echo "正在初始化 Telegram 用户表..."
# 检查 MySQL 是否运行
if ! command -v mysql &> /dev/null; then
echo "❌ MySQL 未安装或未在 PATH 中"
exit 1
fi
# 执行 SQL 文件
mysql -h127.0.0.1 -uroot < init-telegram-users.sql
if [ $? -eq 0 ]; then
echo "✅ Telegram 用户表初始化成功!"
echo ""
echo "已创建的功能:"
echo " • Telegram 用户表 (tg_telegram_users)"
echo " • 15 条示例用户数据"
echo " • 包含各种用户类型:"
echo " - 普通用户"
echo " - 机器人"
echo " - 认证用户"
echo " - Premium 用户"
echo " - 特殊标记账号(诈骗、虚假、受限等)"
echo ""
echo "📊 统计信息:"
echo " • 总用户数15"
echo " • 在线用户6"
echo " • 机器人4"
echo " • 认证用户7"
echo " • Premium用户5"
else
echo "❌ 初始化失败"
exit 1
fi