import { JsonTransformer } from '../../transformers/json.transformer'
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm'

@Entity()
export class PaperGenResult {
    @PrimaryGeneratedColumn()
    id: number

    @CreateDateColumn()
    createdAt: Date

    @Column()
    orderId: number

    @Column({ type: 'longtext' })
    content: string

    @Column()
    fileUrl: string

    @Column({ type: 'text', transformer: new JsonTransformer() })
    tokenUsage: any

    @Column()
    duration: number
}
