All files / src/core-entities project.entity.ts

92.3% Statements 12/13
100% Branches 0/0
66.66% Functions 2/3
90% Lines 9/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 3348x 48x 48x 48x             48x           48x             48x           6x 48x    
import { Entity, Column, OneToMany } from 'typeorm';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { BaseEntity } from './base.entity';
import { Session } from './session.entity';
 
/**
 * A Project represents a workspace/directory that Repoburg operates on.
 * Projects contain Sessions which track conversation history and AI actions.
 */
@Entity('projects')
export class Project extends BaseEntity {
  @ApiProperty({
    description: 'Human-readable name for the project',
    example: 'My React App',
  })
  @Column({ type: 'text' })
  project_name: string;
 
  @ApiProperty({
    description: 'Absolute filesystem path to the project directory',
    example: '/Users/dev/projects/my-react-app',
  })
  @Column({ type: 'text' })
  project_path: string;
 
  @ApiPropertyOptional({
    description: 'Sessions associated with this project',
    type: () => [Session],
  })
  @OneToMany(() => Session, (session) => session.project)
  sessions: Session[];
}