task-managment / src / server / material / domain / models.ts
models.ts
Raw
import { ProjectId } from "@/server/project/domain/models";

export interface Material {
  id?: string;
  name: string;
  price: number;
  brand?: string;
}

export interface MaterialId{
  value:string
}

export interface ProjectMaterial {
  id?: string;
  projectId: string;
  projectName:string
  materialId: string;
  requiredQuantity: number;
  usedQuantity?: number;
  availableQuantity: number;
}

export interface UpdateProjectMaterial{
  projectId: ProjectId;
  projectName:string;
  materialId:MaterialId;
  fields:{
    requiredQuantity?: number;
    usedQuantity?: number;
    availableQuantity?: number;
  }
}

export interface DeleteMaterial{
  materialIds:string[],
}

export interface DeleteProjectMaterial{
  materialId:string,
  name:string
  projectName:string
  projectId:string
}