Create TimeRecord, Timetrackaccount and Role
Move Entities in correct packages
This commit is contained in:
parent
945316ae67
commit
56a3ddad27
@ -14,7 +14,6 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
package de.hft.geotime.record;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface RecordRepository extends CrudRepository<TimeRecord, Long> {
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.hft.geotime.entities;
|
package de.hft.geotime.record;
|
||||||
|
|
||||||
public enum RecordType {
|
public enum RecordType {
|
||||||
BREAK,
|
BREAK,
|
@ -1,9 +1,9 @@
|
|||||||
package de.hft.geotime.entities;
|
package de.hft.geotime.record;
|
||||||
|
|
||||||
|
import de.hft.geotime.timetrackaccount.TimetrackAccount;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.hibernate.type.TimeType;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
@ -1,9 +0,0 @@
|
|||||||
package de.hft.geotime.repositories;
|
|
||||||
|
|
||||||
import de.hft.geotime.entities.Role;
|
|
||||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
||||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
|
||||||
|
|
||||||
@RepositoryRestResource
|
|
||||||
public interface RoleRepository extends PagingAndSortingRepository<Role, Long> {
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
package de.hft.geotime.repositories;
|
|
||||||
|
|
||||||
import de.hft.geotime.entities.User;
|
|
||||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
||||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
|
||||||
|
|
||||||
import javax.websocket.server.PathParam;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RepositoryRestResource
|
|
||||||
public interface UserRepository extends PagingAndSortingRepository<User, Long> {
|
|
||||||
|
|
||||||
List<User> findByUsername(@PathParam("username") String username);
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.hft.geotime.entities;
|
package de.hft.geotime.role;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
@ -0,0 +1,7 @@
|
|||||||
|
package de.hft.geotime.role;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface RoleRepository extends CrudRepository<Role, Long> {
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package de.hft.geotime.entities;
|
package de.hft.geotime.timetrackaccount;
|
||||||
|
|
||||||
|
import de.hft.geotime.user.User;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
@ -0,0 +1,7 @@
|
|||||||
|
package de.hft.geotime.timetrackaccount;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface TimetrackAccountRepository extends CrudRepository<TimetrackAccount, Long> {
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package de.hft.geotime.entities;
|
package de.hft.geotime.user;
|
||||||
|
|
||||||
|
import de.hft.geotime.role.Role;
|
||||||
|
import de.hft.geotime.timetrackaccount.TimetrackAccount;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
@ -0,0 +1,12 @@
|
|||||||
|
package de.hft.geotime.user;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
import javax.websocket.server.PathParam;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UserRepository extends CrudRepository<User, Long> {
|
||||||
|
|
||||||
|
List<User> findByUsername(@PathParam("username") String username);
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
server.port=80
|
server.port=80
|
||||||
spring.data.rest.basePath=/api
|
|
||||||
spring.datasource.hikari.initialization-fail-timeout=0
|
spring.datasource.hikari.initialization-fail-timeout=0
|
||||||
spring.datasource.hikari.max-lifetime=300000
|
spring.datasource.hikari.max-lifetime=300000
|
||||||
spring.profiles.active=prod
|
spring.profiles.active=prod
|
Loading…
Reference in New Issue
Block a user