fix: fix some changes

This commit is contained in:
2026-12-01 08:36:29 +03:30
parent 8a1e61b0f7
commit a202e65692
4 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"local": { "local": {
"baseUrl": "http://localhost:3000/v1" "baseUrl": "http://localhost:8000/v1"
}, },
"dev": { "dev": {
"baseUrl": "http://localhost:3000" "baseUrl": "http://localhost:3000"
+1 -1
View File
@@ -48,7 +48,7 @@ class ArticleUploadDto {
@IsString() @IsString()
@IsNotEmpty() @IsNotEmpty()
@MaxLength(240) @MaxLength(240)
title: string; title!: string;
@IsOptional() @IsOptional()
@MaxLength(2048) @MaxLength(2048)
@@ -23,33 +23,33 @@ export class ArticleChunk {
@PrimaryGeneratedColumn('identity', { @PrimaryGeneratedColumn('identity', {
primaryKeyConstraintName: 'rag_article_chunk_pkey', primaryKeyConstraintName: 'rag_article_chunk_pkey',
}) })
id: number; id!: number;
@Column('uuid') @Column('uuid')
articleId: string; articleId!: string;
@ManyToOne(() => Article, { onDelete: 'CASCADE' }) @ManyToOne(() => Article, { onDelete: 'CASCADE' })
@JoinColumn({ @JoinColumn({
name: 'articleId', name: 'articleId',
foreignKeyConstraintName: 'rag_chunk_article_fkey', foreignKeyConstraintName: 'rag_chunk_article_fkey',
}) })
article: Article; article!: Article;
@Column('integer') @Column('integer')
chunkIndex: number; chunkIndex!: number;
@Column('text') @Column('text')
content: string; content!: string;
@Column('vector', { length: 384 }) @Column('vector', { length: 384 })
embedding: number[]; embedding!: number[];
@Column('jsonb') @Column('jsonb')
metadata: ChunkMetadata; metadata!: ChunkMetadata;
@CreateDateColumn({ type: 'timestamptz' }) @CreateDateColumn({ type: 'timestamptz' })
createdAt: Date; createdAt!: Date;
@UpdateDateColumn({ type: 'timestamptz' }) @UpdateDateColumn({ type: 'timestamptz' })
updatedAt: Date; updatedAt!: Date;
} }
+14 -14
View File
@@ -18,44 +18,44 @@ export type ArticleStatus = 'pending' | 'processing' | 'ready' | 'failed';
) )
export class Article { export class Article {
@PrimaryColumn('uuid', { primaryKeyConstraintName: 'rag_article_pkey' }) @PrimaryColumn('uuid', { primaryKeyConstraintName: 'rag_article_pkey' })
id: string; id!: string;
@Column('uuid') @Column('uuid')
storageKey: string; storageKey!: string;
@Column('uuid', { nullable: true }) @Column('uuid', { nullable: true })
runToken: string | null; runToken!: string | null;
@Column({ length: 240 }) @Column({ length: 240 })
title: string; title!: string;
@Column({ length: 255 }) @Column({ length: 255 })
fileName: string; fileName!: string;
@Column({ length: 120 }) @Column({ length: 120 })
mimeType: string; mimeType!: string;
@Column('integer') @Column('integer')
byteSize: number; byteSize!: number;
@Column('varchar', { length: 2048, nullable: true }) @Column('varchar', { length: 2048, nullable: true })
sourceUrl: string | null; sourceUrl!: string | null;
@Column('varchar', { length: 16 }) @Column('varchar', { length: 16 })
status: ArticleStatus; status!: ArticleStatus;
@Column('integer', { default: 1 }) @Column('integer', { default: 1 })
generation: number; generation!: number;
@Column('varchar', { length: 300, nullable: true }) @Column('varchar', { length: 300, nullable: true })
embeddingModel: string | null; embeddingModel!: string | null;
@Column('varchar', { length: 80, nullable: true }) @Column('varchar', { length: 80, nullable: true })
errorCode: string | null; errorCode!: string | null;
@CreateDateColumn({ type: 'timestamptz' }) @CreateDateColumn({ type: 'timestamptz' })
createdAt: Date; createdAt!: Date;
@UpdateDateColumn({ type: 'timestamptz' }) @UpdateDateColumn({ type: 'timestamptz' })
updatedAt: Date; updatedAt!: Date;
} }