24 lines
630 B
TypeScript
24 lines
630 B
TypeScript
import { Column, Entity, ManyToOne } from 'typeorm';
|
|
import { AppBaseEntity } from '../commons/entities/app-base-entity';
|
|
import { Project } from '../projects/project.entity';
|
|
import { ObjectType } from '@nestjs/graphql';
|
|
import { WorkUnitMetadata } from '../pipeline-tasks/models/work-unit-metadata.model';
|
|
|
|
@ObjectType()
|
|
@Entity()
|
|
export class Pipeline extends AppBaseEntity {
|
|
@ManyToOne(() => Project)
|
|
project: Project;
|
|
@Column()
|
|
projectId: string;
|
|
|
|
@Column({ comment: 'eg: remotes/origin/master' })
|
|
branch: string;
|
|
|
|
@Column()
|
|
name: string;
|
|
|
|
@Column({ type: 'jsonb' })
|
|
workUnitMetadata: WorkUnitMetadata;
|
|
}
|