Spaces:
Sleeping
Sleeping
Download src/modules/users/entities/user-data-source.entity.ts from mahrooshishaq/SmartfolioBackend: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/users/entities/user-data-source.entity.ts
- Command line
-
hf download hf://spaces/mahrooshishaq/SmartfolioBackend/src/modules/users/entities/user-data-source.entity.ts
-
curl -L -o user-data-source.entity.ts https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/users/entities/user-data-source.entity.ts
1.19 kB
| import { | |
| Entity, | |
| PrimaryGeneratedColumn, | |
| Column, | |
| ManyToOne, | |
| CreateDateColumn, | |
| JoinColumn, | |
| } from 'typeorm'; | |
| import { User } from '../user.entity'; | |
| import { DataSourceType } from '../../../common/enums/user-enums'; | |
| /** | |
| * Tracks all information sources about the user | |
| * Maintains data lineage for quality and debugging | |
| */ | |
| ('user_data_sources') | |
| export class UserDataSource { | |
| ('uuid') | |
| id: string; | |
| ({ type: 'uuid' }) | |
| userId: string; | |
| (() => User, { onDelete: 'CASCADE' }) | |
| ({ name: 'userId' }) | |
| user: User; | |
| ({ | |
| type: 'enum', | |
| enum: DataSourceType, | |
| }) | |
| sourceType: DataSourceType; | |
| ({ type: 'varchar', length: 100 }) | |
| sourceName: string; // "onboarding_v1", "resume_2024.pdf", "search_history_jan" | |
| /** | |
| * Raw extracted data from this source | |
| * Can be processed and distributed to other tables | |
| */ | |
| ({ type: 'jsonb' }) | |
| rawData: Record<string, any>; | |
| ({ type: 'boolean', default: false }) | |
| isProcessed: boolean; | |
| ({ type: 'int', default: 100 }) | |
| confidence: number; // Data quality score 0-100 | |
| () | |
| createdAt: Date; | |
| } | |