Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .jhipster/Employee.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "Employee",
"fields": [
{
"fieldName": "clientId",
"fieldType": "String"
},
{
"fieldName": "advisorId",
"fieldType": "String"
},
{
"fieldName": "appointmentId",
"fieldType": "String"
},
{
"fieldName": "roomId",
"fieldType": "String"
},
{
"fieldName": "token",
"fieldType": "String"
},
{
"fieldName": "endDate",
"fieldType": "Instant"
},
{
"fieldName": "startDate",
"fieldType": "Instant"
}
],
"relationships": [],
"changelogDate": "20190619212931",
"javadoc": "The Employee entity.",
"entityTableName": "employee",
"dto": "mapstruct",
"pagination": "no",
"service": "serviceImpl",
"jpaMetamodelFiltering": false,
"fluentMethods": true,
"clientRootFolder": "micro",
"applications": "*",
"microserviceName": "micro"
}
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@
</dependencyManagement>

<dependencies>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>

<dependency>
<groupId>io.github.jhipster</groupId>
<artifactId>jhipster-framework</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public void configure(WebSecurity web) throws Exception {
.antMatchers(HttpMethod.OPTIONS, "/**")
.antMatchers("/h2-console/**")
.antMatchers("/swagger-ui/index.html")
.antMatchers("/swagger-ui.html")
.antMatchers("/test/**");
}

Expand Down Expand Up @@ -62,7 +63,7 @@ public void configure(HttpSecurity http) throws Exception {
.and()
.authorizeRequests()
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/**").authenticated()
.antMatchers("/api/**").permitAll()
.antMatchers("/management/health").permitAll()
.antMatchers("/management/info").permitAll()
.antMatchers("/management/prometheus").permitAll()
Expand Down
173 changes: 173 additions & 0 deletions src/main/java/io/github/jhipster/application/domain/Employee.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
package io.github.jhipster.application.domain;

import javax.persistence.*;

import java.io.Serializable;
import java.time.Instant;

/**
* The Employee entity.
*/
@Entity
@Table(name = "employee")
public class Employee implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;

@Column(name = "client_id")
private String clientId;

@Column(name = "advisor_id")
private String advisorId;

@Column(name = "appointment_id")
private String appointmentId;

@Column(name = "room_id")
private String roomId;

@Column(name = "token")
private String token;

@Column(name = "end_date")
private Instant endDate;

@Column(name = "start_date")
private Instant startDate;

// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getClientId() {
return clientId;
}

public Employee clientId(String clientId) {
this.clientId = clientId;
return this;
}

public void setClientId(String clientId) {
this.clientId = clientId;
}

public String getAdvisorId() {
return advisorId;
}

public Employee advisorId(String advisorId) {
this.advisorId = advisorId;
return this;
}

public void setAdvisorId(String advisorId) {
this.advisorId = advisorId;
}

public String getAppointmentId() {
return appointmentId;
}

public Employee appointmentId(String appointmentId) {
this.appointmentId = appointmentId;
return this;
}

public void setAppointmentId(String appointmentId) {
this.appointmentId = appointmentId;
}

public String getRoomId() {
return roomId;
}

public Employee roomId(String roomId) {
this.roomId = roomId;
return this;
}

public void setRoomId(String roomId) {
this.roomId = roomId;
}

public String getToken() {
return token;
}

public Employee token(String token) {
this.token = token;
return this;
}

public void setToken(String token) {
this.token = token;
}

public Instant getEndDate() {
return endDate;
}

public Employee endDate(Instant endDate) {
this.endDate = endDate;
return this;
}

public void setEndDate(Instant endDate) {
this.endDate = endDate;
}

public Instant getStartDate() {
return startDate;
}

public Employee startDate(Instant startDate) {
this.startDate = startDate;
return this;
}

public void setStartDate(Instant startDate) {
this.startDate = startDate;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Employee)) {
return false;
}
return id != null && id.equals(((Employee) o).id);
}

@Override
public int hashCode() {
return 31;
}

@Override
public String toString() {
return "Employee{" +
"id=" + getId() +
", clientId='" + getClientId() + "'" +
", advisorId='" + getAdvisorId() + "'" +
", appointmentId='" + getAppointmentId() + "'" +
", roomId='" + getRoomId() + "'" +
", token='" + getToken() + "'" +
", endDate='" + getEndDate() + "'" +
", startDate='" + getStartDate() + "'" +
"}";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.github.jhipster.application.repository;

import io.github.jhipster.application.domain.Employee;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;


/**
* Spring Data repository for the Employee entity.
*/
@SuppressWarnings("unused")
@Repository
public interface EmployeeRepository extends JpaRepository<Employee, Long> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package io.github.jhipster.application.service;

import io.github.jhipster.application.service.dto.EmployeeDTO;

import java.util.List;
import java.util.Optional;

/**
* Service Interface for managing {@link io.github.jhipster.application.domain.Employee}.
*/
public interface EmployeeService {

/**
* Save a employee.
*
* @param employeeDTO the entity to save.
* @return the persisted entity.
*/
EmployeeDTO save(EmployeeDTO employeeDTO);

/**
* Get all the employees.
*
* @return the list of entities.
*/
List<EmployeeDTO> findAll();


/**
* Get the "id" employee.
*
* @param id the id of the entity.
* @return the entity.
*/
Optional<EmployeeDTO> findOne(Long id);

/**
* Delete the "id" employee.
*
* @param id the id of the entity.
*/
void delete(Long id);
}
Loading