diff --git a/src/modules/space/entity/info.ts b/src/modules/space/entity/info.ts new file mode 100644 index 0000000..ee5a433 --- /dev/null +++ b/src/modules/space/entity/info.ts @@ -0,0 +1,33 @@ +import { BaseEntity } from '../../base/entity/base'; +import { Column, Index, Entity } from 'typeorm'; + +/** + * 文件空间信息 + */ +@Entity('space_info') +export class SpaceInfoEntity extends BaseEntity { + @Column({ comment: '地址' }) + url: string; + + @Column({ comment: '类型' }) + type: string; + + @Column({ comment: '分类ID', nullable: true }) + classifyId: number; + + @Index() + @Column({ comment: '文件id' }) + fileId: string; + + @Column({ comment: '文件名' }) + name: string; + + @Column({ comment: '文件大小' }) + size: number; + + @Column({ comment: '文档版本', default: 1 }) + version: number; + + @Column({ comment: '文件位置' }) + key: string; +}