Skip to content

Commit

Permalink
Merge branch 'Demo_branch_new' into bugfix/DCMFOSS-117
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruskyy authored Dec 15, 2023
2 parents aa917a4 + b8d6d1f commit aee2ed2
Show file tree
Hide file tree
Showing 56 changed files with 1,143 additions and 1,967 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
package org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities;

import jakarta.persistence.*;
import java.util.UUID;
import lombok.*;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums.WeekColor;

import java.util.UUID;

@Entity
@Table(name = "capacity_time_series")
Expand All @@ -48,6 +50,13 @@ public class CapacityTimeSeries {
@Column(name = "maximum_capacity", nullable = false)
private Double maximumCapacity;

@Column(name = "ruled", nullable = false)
private boolean ruled = false;

@Enumerated(EnumType.STRING)
@Column(name = "week_color")
private WeekColor weekColor;

@ToString.Exclude
@EqualsAndHashCode.Exclude
@ManyToOne(fetch = FetchType.LAZY)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
package org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities;

import jakarta.persistence.*;
import lombok.*;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums.WeekColor;

import java.time.LocalDate;
import java.util.UUID;
import lombok.*;

@Entity
@Table(name = "demand_series_values")
Expand All @@ -50,4 +52,11 @@ public class DemandSeriesValues {

@Column(name = "demand", nullable = false)
private Double demand;

@Column(name = "ruled", nullable = false)
private boolean ruled = false;

@Enumerated(EnumType.STRING)
@Column(name = "week_color")
private WeekColor weekColor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.*;
import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;
import lombok.*;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums.EventType;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums.MaterialDemandStatus;

import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;

@Entity
@Cacheable(false)
@Table(name = "material_demand")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* ******************************************************************************
* Copyright (c) 2023 BMW AG
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
* *******************************************************************************
*/

package org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums;

public enum WeekColor {
GREEN,
YELLOW,
RED,
GREY
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
package org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.repositories;

import jakarta.persistence.Cacheable;
import java.util.List;
import java.util.UUID;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.MaterialDemandEntity;
import org.eclipse.tractusx.demandcapacitymgmt.demandcapacitymgmtbackend.entities.enums.MaterialDemandStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.UUID;

@Repository
@Cacheable(false)
public interface MaterialDemandRepository extends JpaRepository<MaterialDemandEntity, UUID> {
List<MaterialDemandEntity> findBySupplierId_Id(UUID id);

@Query("select m from MaterialDemandEntity m where m.customerId.id = ?1")
List<MaterialDemandEntity> findByCustomerId_Id(UUID id);

Expand Down
Loading

0 comments on commit aee2ed2

Please sign in to comment.