import { Model } from 'sequelize'

export class KnowledgeEmbedding extends Model {
    id: number

    orgId: number

    knowledgeId: number

    fileId: number

    fileHash: string

    text: string

    embedding: string

    index: number

    constructor(model?: {
        orgId: number
        knowledgeId: number
        fileId: number
        fileHash: string
        text: string
        embedding: string
        index: number
    }) {
        super()
        if (model) {
            this.orgId = model.orgId
            this.knowledgeId = model.knowledgeId
            this.fileId = model.fileId
            this.fileHash = model.fileHash
            this.text = model.text
            this.embedding = model.embedding
            this.index = model.index
        }
    }
}
