62c969d1ff
* Add resolver function for fetching all deployments for a project * Fetch project members while fetching organization data * Map db project member and deployment entity to graphql type * Fetch environment variables data while fetching organizations * Add domain field in deployment --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
45 lines
738 B
TypeScript
45 lines
738 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
ManyToOne,
|
|
JoinColumn
|
|
} from 'typeorm';
|
|
|
|
import { Project } from './Project';
|
|
|
|
enum Environment {
|
|
Production = 'Production',
|
|
Preview = 'Preview',
|
|
Development = 'Development',
|
|
}
|
|
|
|
@Entity()
|
|
export class EnvironmentVariable {
|
|
@PrimaryGeneratedColumn()
|
|
id!: number;
|
|
|
|
@ManyToOne(() => Project, { onDelete: 'CASCADE' })
|
|
@JoinColumn({ name: 'projectId' })
|
|
project!: Project;
|
|
|
|
@Column({
|
|
type: 'simple-array'
|
|
})
|
|
environments!: Environment[];
|
|
|
|
@Column('varchar')
|
|
key!: string;
|
|
|
|
@Column('varchar')
|
|
value!: string;
|
|
|
|
@CreateDateColumn()
|
|
createdAt!: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt!: Date;
|
|
}
|