finish the launch

This commit is contained in:
IDONTSUDO 2023-10-31 09:03:41 +03:00
parent 6ca82f8c2e
commit fbcfba3948
12 changed files with 58 additions and 92 deletions

View file

@ -1,12 +1,12 @@
import mongoose, { Schema, model } from "mongoose";
import { Schema, model } from "mongoose";
import { PipelineModel, schemaPipeline } from "../pipelines/pipeline_model";
import { IsMongoId, IsString } from "class-validator";
export interface IProjectModel {
pipelines: [PipelineModel];
rootDir: string;
}
export const ProjectSchema = new Schema({
pipelines: {
type: Array<Schema.Types.ObjectId>,
@ -24,19 +24,8 @@ const schema = "Projects";
export const ProjectDBModel = model<IProjectModel>(schema, ProjectSchema);
export class ProjectModel implements IProjectModel {
@IsMongoId()
pipelines: [PipelineModel];
@IsString()
rootDir: string;
}
// export class ProcessModel implements IProcessMetaData {
// public process: IProcess;
// public trigger: ObjectId;
// // TODO(IDONTSUDO): later, when maintaining many environments, you will need to make a table
// public env = null;
// @IsEnum(StackGenerateType)
// public stackGenerateType: StackGenerateType;
// }