import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';

/**
 * 知识信息类型
 */
@Entity('know_data_type')
export class KnowDataTypeEntity extends BaseEntity {
  @Column({ comment: '名称' })
  name: string;

  @Column({ comment: '图标', nullable: true })
  icon: string;

  @Column({ comment: '描述', nullable: true })
  description: string;

  @Column({ comment: 'embedding配置ID' })
  embedConfigId: number;

  @Column({ comment: 'embedding配置', type: 'json', nullable: true })
  embedOptions: any;

  @Column({ comment: '是否开启rerank 0-否 1-是', default: 0 })
  enableRerank: number;

  @Column({ comment: 'rerank配置ID', nullable: true })
  rerankConfigId: number;

  @Column({ comment: 'rerank配置', type: 'json', nullable: true })
  rerankOptions: any;

  @Column({ comment: '链接更新频率(天)', nullable: true })
  updateFrequency: number;

  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  enable: number;
}
