mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-23 18:29:21 -05:00
34 lines
734 B
TypeScript
34 lines
734 B
TypeScript
import {
|
|
Entity,
|
|
Column,
|
|
PrimaryGeneratedColumn,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
/**
|
|
* User configuration entity for database storage
|
|
*/
|
|
@Entity({ name: 'user_configs' })
|
|
export class UserConfig {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ type: 'varchar', length: 255, unique: true })
|
|
username: string;
|
|
|
|
@Column({ type: 'simple-json', nullable: true })
|
|
routing?: Record<string, any>;
|
|
|
|
@Column({ type: 'simple-json', nullable: true })
|
|
additionalConfig?: Record<string, any>;
|
|
|
|
@CreateDateColumn({ name: 'created_at', type: 'timestamp' })
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp' })
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export default UserConfig;
|