progress
This commit is contained in:
parent
6f86377685
commit
8ecb036b1d
36 changed files with 498 additions and 212 deletions
|
@ -1,8 +1,9 @@
|
|||
import { Schema, model } from "mongoose";
|
||||
import { PipelineModel, schemaPipeline } from "../pipelines/pipeline_model";
|
||||
import { IsMongoId, IsString } from "class-validator";
|
||||
import { IsArray, IsOptional, IsString } from "class-validator";
|
||||
|
||||
export interface IProjectModel {
|
||||
_id: string;
|
||||
pipelines: [PipelineModel];
|
||||
rootDir: string;
|
||||
description: string;
|
||||
|
@ -27,13 +28,11 @@ const schema = "Projects";
|
|||
|
||||
export const ProjectDBModel = model<IProjectModel>(schema, ProjectSchema);
|
||||
|
||||
export class ProjectModel implements IProjectModel {
|
||||
@IsMongoId()
|
||||
public pipelines: [PipelineModel];
|
||||
|
||||
@IsString()
|
||||
public rootDir: string;
|
||||
|
||||
export class ProjectValidationModel {
|
||||
@IsArray()
|
||||
public pipelines: [string];
|
||||
@IsString()
|
||||
public description: string;
|
||||
@IsOptional()
|
||||
public rootDir: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue