Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled

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>
This commit is contained in:
你的用户名
2025-11-04 15:37:50 +08:00
commit 237c7802e5
3674 changed files with 525172 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
Index,
} from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
@Entity('tg_account')
@Index(['phone', 'deviceId'], { unique: false }) // 允许同一手机号多设备登录
export class TgAccount {
@ApiProperty({ description: 'TG账号ID' })
@PrimaryGeneratedColumn()
id: number;
@ApiProperty({ description: '名字' })
@Column({ nullable: true, comment: '姓' })
firstname: string;
@ApiProperty({ description: '姓氏' })
@Column({ nullable: true, comment: '名字' })
lastname: string;
@ApiProperty({ description: '简介' })
@Column({ nullable: true, comment: '简介' })
about: string;
@ApiProperty({ description: '手机号' })
@Column({ comment: '手机号' })
phone: string;
@ApiProperty({ description: '用户名' })
@Column({ nullable: true, comment: '用户名' })
username: string;
@ApiProperty({ description: '设备ID' })
@Column({ nullable: true, comment: '设备ID' })
deviceId: string;
@ApiProperty({ description: '是否在线' })
@Column({ default: false, comment: '是否在线' })
isOnline: boolean;
@ApiProperty({ description: '账号状态' })
@Column({ default: 1, comment: '账号状态: 1正常 2封号 3限制' })
status: number;
@ApiProperty({ description: '会话字符串' })
@Column({ type: 'text', nullable: true, comment: '会话字符串' })
sessionString: string;
@ApiProperty({ description: 'API ID' })
@Column({ nullable: true, comment: 'API ID' })
apiId: string;
@ApiProperty({ description: 'API Hash' })
@Column({ nullable: true, comment: 'API Hash' })
apiHash: string;
@ApiProperty({ description: '代理配置' })
@Column({ type: 'json', nullable: true, comment: '代理配置' })
proxyConfig: any;
@ApiProperty({ description: '最后活跃时间' })
@Column({ type: 'datetime', nullable: true, comment: '最后活跃时间' })
lastActiveAt: Date;
@ApiProperty({ description: '创建时间' })
@CreateDateColumn()
createdAt: Date;
@ApiProperty({ description: '更新时间' })
@UpdateDateColumn()
updatedAt: Date;
}