Compare commits
No commits in common. "ba13f2110254698f93e25b1722b9a597e16f3ca7" and "bf5e51b4258dc281232e50b35477fee7bfe030fc" have entirely different histories.
ba13f21102
...
bf5e51b425
19
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
19
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://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.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
|
||||
@ -10,16 +10,14 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
package com.techivw.webprice.application.ports.in;
|
||||
|
||||
import com.techivw.webprice.domain.Price;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public interface PriceServicePort {
|
||||
|
||||
Price getPriceWithHighestPriorityByDateTimeAndProductIdAndBrandId(LocalDateTime dateTime, Long productId, Long brandId);
|
||||
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package com.techivw.webprice.application.ports.out;
|
||||
|
||||
import com.techivw.webprice.domain.Price;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface PriceRepositoryPort {
|
||||
|
||||
Optional<Price> findHighestPriorityPriceByDateTimeAndProductIdAndBrandId(LocalDateTime dateTime, Long productId, Long brandId);
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.techivw.webprice.application.services;
|
||||
|
||||
import com.techivw.webprice.application.ports.in.PriceServicePort;
|
||||
import com.techivw.webprice.application.ports.out.PriceRepositoryPort;
|
||||
import com.techivw.webprice.domain.Price;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PriceService implements PriceServicePort {
|
||||
|
||||
PriceRepositoryPort priceRepositoryPort;
|
||||
|
||||
@Override
|
||||
public Price getPriceWithHighestPriorityByDateTimeAndProductIdAndBrandId(LocalDateTime dateTime, Long productId, Long brandId) {
|
||||
return priceRepositoryPort.findHighestPriorityPriceByDateTimeAndProductIdAndBrandId(dateTime, productId, brandId).orElse(null);
|
||||
}
|
||||
}
|
||||
46
boot/pom.xml
46
boot/pom.xml
@ -4,47 +4,67 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<artifactId>boot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>boot</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- Project modules -->
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>rest-api</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>sql-repository</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
</project>
|
||||
@ -1,12 +1 @@
|
||||
spring.application.name=webprice
|
||||
|
||||
# Database Configuration
|
||||
spring.datasource.url=jdbc:h2:mem:webprice
|
||||
spring.datasource.driverClassName=org.h2.Driver
|
||||
spring.datasource.username=admin
|
||||
spring.datasource.password=admin
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# H2 console
|
||||
spring.h2.console.enabled=true
|
||||
spring.h2.console.path=/h2-console
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
package com.techivw.webprice.domain;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class Price {
|
||||
|
||||
private Long id;
|
||||
private Long brandId;
|
||||
private LocalDateTime startDate;
|
||||
private LocalDateTime endDate;
|
||||
private Long priceList;
|
||||
private Long productId;
|
||||
private Integer priority;
|
||||
private BigDecimal price;
|
||||
private String currency;
|
||||
|
||||
}
|
||||
@ -4,27 +4,24 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>rest-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>rest-api</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.in.controllers.adapters;
|
||||
|
||||
import com.techivw.webprice.application.ports.in.PriceServicePort;
|
||||
import com.techivw.webprice.domain.Price;
|
||||
import com.techivw.webprice.infrastructure.in.controllers.model.PriceResponse;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/price")
|
||||
public class PriceControllerAdapter {
|
||||
|
||||
private PriceServicePort priceServicePort;
|
||||
|
||||
@GetMapping
|
||||
@Operation(
|
||||
summary = "Get product price",
|
||||
description = "Returns the current price for a specific product from a particular brand at a given date and time"
|
||||
)
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "Price information found",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(implementation = PriceResponse.class))
|
||||
)
|
||||
@ApiResponse(responseCode = "404", description = "Price information not found for the given parameters")
|
||||
@ApiResponse(responseCode = "400", description = "Invalid request parameters")
|
||||
public ResponseEntity<PriceResponse> getPrice(
|
||||
@Parameter(description = "Date and time for price lookup (ISO format)", example = "2025-04-30T12:00:00")
|
||||
@RequestParam(name = "dateTime") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime,
|
||||
@Parameter(description = "Product ID", example = "35455")
|
||||
@RequestParam(name = "productId") Long productId,
|
||||
@Parameter(description = "Brand ID", example = "1")
|
||||
@RequestParam(name = "brandId") Long brandId) {
|
||||
|
||||
Price price = priceServicePort.getPriceWithHighestPriorityByDateTimeAndProductIdAndBrandId(dateTime, productId, brandId);
|
||||
PriceResponse priceResponse = PriceResponse.builder()
|
||||
.productId(price.getProductId())
|
||||
.brandId(price.getBrandId())
|
||||
.priceList(price.getPriceList())
|
||||
.startDate(price.getStartDate())
|
||||
.endDate(price.getEndDate())
|
||||
.price(price.getPrice())
|
||||
.build();
|
||||
return ResponseEntity.ok(priceResponse);
|
||||
}
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.in.controllers.model;
|
||||
|
||||
import lombok.Builder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Builder
|
||||
public class PriceResponse {
|
||||
|
||||
private Long productId;
|
||||
private Long brandId;
|
||||
private Long priceList;
|
||||
private LocalDateTime startDate;
|
||||
private LocalDateTime endDate;
|
||||
private BigDecimal price;
|
||||
}
|
||||
@ -10,21 +10,18 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.repositories;
|
||||
|
||||
import com.techivw.webprice.infrastructure.repositories.model.PriceEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface PriceEntityJPARepository extends JpaRepository<PriceEntity, Long> {
|
||||
|
||||
@Query("SELECT p FROM PriceEntity p WHERE " +
|
||||
"p.productId = :productId " +
|
||||
"AND p.brandId = :brandId " +
|
||||
"AND :dateTime BETWEEN p.startDate AND p.endDate " +
|
||||
"ORDER BY p.priority DESC LIMIT 1")
|
||||
Optional<PriceEntity> findPriceByDateTimeAndProductIdAndBrandId(LocalDateTime dateTime, Long productId, Long brandId);
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.repositories.adapters;
|
||||
|
||||
import com.techivw.webprice.application.ports.out.PriceRepositoryPort;
|
||||
import com.techivw.webprice.domain.Price;
|
||||
import com.techivw.webprice.infrastructure.repositories.PriceEntityJPARepository;
|
||||
import com.techivw.webprice.infrastructure.repositories.mappers.PriceEntityMapper;
|
||||
import com.techivw.webprice.infrastructure.repositories.model.PriceEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PriceRepositoryAdapter implements PriceRepositoryPort {
|
||||
|
||||
private final PriceEntityJPARepository repository;
|
||||
|
||||
@Override
|
||||
public Optional<Price> findHighestPriorityPriceByDateTimeAndProductIdAndBrandId(LocalDateTime dateTime, Long productId, Long brandId) {
|
||||
|
||||
Optional<PriceEntity> priceEntity =
|
||||
repository.findPriceByDateTimeAndProductIdAndBrandId(dateTime, productId, brandId);
|
||||
|
||||
return PriceEntityMapper.toOptionalPrice(priceEntity);
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.repositories.mappers;
|
||||
|
||||
import com.techivw.webprice.domain.Price;
|
||||
import com.techivw.webprice.infrastructure.repositories.model.PriceEntity;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class PriceEntityMapper {
|
||||
|
||||
public static Price toPrice(PriceEntity priceEntity) {
|
||||
return Price.builder()
|
||||
.id(priceEntity.getId())
|
||||
.brandId(priceEntity.getBrandId())
|
||||
.startDate(priceEntity.getStartDate())
|
||||
.endDate(priceEntity.getEndDate())
|
||||
.priceList(priceEntity.getPriceList())
|
||||
.productId(priceEntity.getProductId())
|
||||
.priority(priceEntity.getPriority())
|
||||
.price(priceEntity.getPrice())
|
||||
.currency(priceEntity.getCurrency())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static Optional<Price> toOptionalPrice(Optional<PriceEntity> priceEntity) {
|
||||
return priceEntity.map(PriceEntityMapper::toPrice);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.techivw.webprice.infrastructure.repositories.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
@Table(name = "prices")
|
||||
public class PriceEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
@Column(name = "brand_id")
|
||||
private Long brandId;
|
||||
|
||||
@Column(name = "start_date")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Column(name = "end_date")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Column(name = "price_list")
|
||||
private Long priceList;
|
||||
|
||||
@Column(name = "product_id")
|
||||
private Long productId;
|
||||
|
||||
@Column(name = "priority")
|
||||
private Integer priority;
|
||||
|
||||
@Column(name = "price")
|
||||
private BigDecimal price;
|
||||
|
||||
@Column(name = "currency")
|
||||
private String currency;
|
||||
|
||||
}
|
||||
89
pom.xml
89
pom.xml
@ -3,6 +3,49 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>webprice</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>web-price</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.4</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>rest-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>sql-repository</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>boot</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>domain</module>
|
||||
<module>application</module>
|
||||
@ -10,50 +53,4 @@
|
||||
<module>infrastructure/out/sql-repository</module>
|
||||
<module>boot</module>
|
||||
</modules>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.4</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.techivw</groupId>
|
||||
<artifactId>web-price</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>web-price</name>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Project dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.8.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user