diff --git a/vent-backend/application.yaml b/vent-backend/application.yaml index 1454b36..6e711b0 100644 --- a/vent-backend/application.yaml +++ b/vent-backend/application.yaml @@ -14,18 +14,25 @@ #spring.jpa.database=default -datasource: - vent: - jdbc-url: jdbc:mysql://172.17.0.2:3306/protus?verifyServerCertificate=false&useSSL=true - #url: jdbc:mysql://172.17.0.2:3306/protus?verifyServerCertificate=false&useSSL=true - username: root - password: stockli - # driver-class-name: com.mysql.jdbc.Driver # validation-query: select 1 - protus: - jdbc-url: jdbc:mysql://172.17.0.2:3306/vent?verifyServerCertificate=false&useSSL=true - #url: jdbc:mysql://172.17.0.2:3306/vent?verifyServerCertificate=false&useSSL=true - username: root - password: stockli - # driver-class-name: com.mysql.jdbc.Driver - # validation-query: select 1 \ No newline at end of file + +spring: + datasource: + vent: + jdbc-url: jdbc:mysql://172.17.0.2:3306/vent?verifyServerCertificate=false&useSSL=true + #url: jdbc:mysql://172.17.0.2:3306/protus?verifyServerCertificate=false&useSSL=true + username: root + password: stockli + driver-class-name: com.mysql.jdbc.Driver + # validation-query: select 1 + protus: + jdbc-url: jdbc:mysql://172.17.0.2:3306/protus?verifyServerCertificate=false&useSSL=true + #url: jdbc:mysql://172.17.0.2:3306/vent?verifyServerCertificate=false&useSSL=true + username: root + password: stockli + driver-class-name: com.mysql.jdbc.Driver + jpa: + hibernate: + ddl-auto: update + naming: + implicit-strategy: default #org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/META-INF/persistence.xml b/vent-backend/src/main/kotlin/META-INF/persistence.xml index c85a868..3f5cb40 100644 --- a/vent-backend/src/main/kotlin/META-INF/persistence.xml +++ b/vent-backend/src/main/kotlin/META-INF/persistence.xml @@ -3,21 +3,21 @@ org.hibernate.jpa.HibernatePersistenceProvider - com.hernil.vent.protus.ActionTypeEntity - com.hernil.vent.protus.CoursesEntity - com.hernil.vent.protus.LearnersEntity - com.hernil.vent.protus.LearnersAnswersEntity - com.hernil.vent.protus.LessonsEntity - com.hernil.vent.protus.MessagesEntity - com.hernil.vent.protus.OfferedAnswersEntity - com.hernil.vent.protus.ResursEntity - com.hernil.vent.protus.SessionEntity - com.hernil.vent.protus.SettingsEntity - com.hernil.vent.protus.TagsEntity - com.hernil.vent.protus.TeachersEntity - com.hernil.vent.protus.TestEntity - com.hernil.vent.protus.UnitsEntity - com.hernil.vent.protus.UsersActionEntity + com.hernil.vent.protus.domain.ActionTypeEntity + com.hernil.vent.protus.domain.CoursesEntity + com.hernil.vent.protus.domain.LearnersEntity + com.hernil.vent.protus.domain.LearnersAnswersEntity + com.hernil.vent.protus.domain.LessonsEntity + com.hernil.vent.protus.domain.MessagesEntity + com.hernil.vent.protus.domain.OfferedAnswersEntity + com.hernil.vent.protus.domain.ResursEntity + com.hernil.vent.protus.domain.SessionEntity + com.hernil.vent.protus.domain.SettingsEntity + com.hernil.vent.protus.domain.TagsEntity + com.hernil.vent.protus.domain.TeachersEntity + com.hernil.vent.protus.domain.TestEntity + com.hernil.vent.protus.domain.UnitsEntity + com.hernil.vent.protus.domain.UsersActionEntity diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/ProtusConfig.java b/vent-backend/src/main/kotlin/com/hernil/vent/ProtusConfig.java new file mode 100644 index 0000000..4ec5205 --- /dev/null +++ b/vent-backend/src/main/kotlin/com/hernil/vent/ProtusConfig.java @@ -0,0 +1,49 @@ +package com.hernil.vent; + +import javax.persistence.EntityManagerFactory; +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.jdbc.DataSourceBuilder; +import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@Configuration +@EnableTransactionManagement +@EnableJpaRepositories( + entityManagerFactoryRef = "protusEntityManagerFactory", + transactionManagerRef = "protusTransactionManager", + basePackages = { "com.hernil.vent.protus" }) +public class ProtusConfig { + + @Bean(name = "protusDataSource") + @ConfigurationProperties(prefix="spring.datasource.protus") + public DataSource protusDataSource() { + return DataSourceBuilder.create().build(); + } + + @Bean(name = "protusEntityManagerFactory") + public LocalContainerEntityManagerFactoryBean protusEntityManagerFactory( + EntityManagerFactoryBuilder builder, + @Qualifier("protusDataSource") DataSource protusDataSource) { + return builder + .dataSource(protusDataSource) + .packages("com.hernil.vent.protus") + .persistenceUnit("protus") + .build(); + } + + @Bean(name = "protusTransactionManager") + public PlatformTransactionManager protusTransactionManager( + @Qualifier("protusEntityManagerFactory") EntityManagerFactory protusEntityManagerFactory) { + return new JpaTransactionManager(protusEntityManagerFactory); + } + +} \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/VentApplicationConfig.kt b/vent-backend/src/main/kotlin/com/hernil/vent/VentApplicationConfig.kt deleted file mode 100644 index 9571c33..0000000 --- a/vent-backend/src/main/kotlin/com/hernil/vent/VentApplicationConfig.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.hernil.vent - -import org.springframework.beans.factory.annotation.Qualifier - -import org.springframework.boot.context.properties.ConfigurationProperties -import org.springframework.boot.jdbc.DataSourceBuilder -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.context.annotation.Primary -import org.springframework.jdbc.core.JdbcTemplate - -import javax.sql.DataSource - -@Configuration -class VentApplicationConfig { - - @Bean(name = arrayOf("jdbcPrimaryTemplate")) - fun jdbcPrimaryTemplate(@Qualifier(value = "primaryDataSource") primaryDataSource: DataSource): JdbcTemplate = - JdbcTemplate(primaryDataSource) - - @Bean(name = arrayOf("jdbcSecondaryTemplate")) - fun jdbcSecondaryTemplate(@Qualifier(value = "secondaryDataSource") secondaryDataSource: DataSource): JdbcTemplate = - JdbcTemplate(secondaryDataSource) - - @Bean(name = arrayOf("primaryDataSource")) - @Primary - @ConfigurationProperties(prefix = "datasource.vent") - fun primaryDataSource(): DataSource = DataSourceBuilder.create().build() - - @Bean(name = arrayOf("secondaryDataSource")) - @ConfigurationProperties(prefix = "datasource.protus") - fun secondaryDataSource(): DataSource = DataSourceBuilder.create().build() -} \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/VentConfig.java b/vent-backend/src/main/kotlin/com/hernil/vent/VentConfig.java new file mode 100644 index 0000000..cf037ac --- /dev/null +++ b/vent-backend/src/main/kotlin/com/hernil/vent/VentConfig.java @@ -0,0 +1,54 @@ +package com.hernil.vent; + +import javax.persistence.EntityManagerFactory; +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.jdbc.DataSourceBuilder; +import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@Configuration +@EnableTransactionManagement +@EnableJpaRepositories( + entityManagerFactoryRef = "entityManagerFactory", + basePackages = {"com.hernil.vent.application"}) +public class VentConfig { + + @Primary + @Bean(name = "dataSource") + @ConfigurationProperties(prefix="spring.datasource.vent") + public DataSource dataSource() { + return DataSourceBuilder.create().build(); + } + + @Primary + @Bean(name = "entityManagerFactory") + public LocalContainerEntityManagerFactoryBean entityManagerFactory( + EntityManagerFactoryBuilder builder, JpaProperties jpaProperties, + @Qualifier("dataSource") DataSource dataSource) { + return builder + .dataSource(dataSource) + .packages("com.hernil.vent.application") + .persistenceUnit("vent") + .properties(jpaProperties.getHibernateProperties("dataSource")) + .build(); + } + + @Primary + @Bean(name = "transactionManager") + public PlatformTransactionManager transactionManager( + @Qualifier("entityManagerFactory") EntityManagerFactory entityManagerFactory) { + return new JpaTransactionManager(entityManagerFactory); + } + +} \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/CourseController.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/CourseController.kt similarity index 78% rename from vent-backend/src/main/kotlin/com/hernil/vent/controllers/CourseController.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/CourseController.kt index eda2752..f04cb7d 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/CourseController.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/CourseController.kt @@ -1,6 +1,6 @@ -package com.hernil.vent.controllers +package com.hernil.vent.application.controllers -import com.hernil.vent.domain.CourseRepository +import com.hernil.vent.application.domain.CourseRepository import org.springframework.web.bind.annotation.* @RestController diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/DataController.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/DataController.kt similarity index 84% rename from vent-backend/src/main/kotlin/com/hernil/vent/controllers/DataController.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/DataController.kt index 011a054..e5adc36 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/DataController.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/DataController.kt @@ -1,7 +1,7 @@ -package com.hernil.vent.controllers +package com.hernil.vent.application.controllers -import com.hernil.vent.domain.Data -import com.hernil.vent.services.DataRepository +import com.hernil.vent.application.domain.Data +import com.hernil.vent.application.services.DataRepository import org.springframework.web.bind.annotation.* @RestController diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/GreetingsController.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/GreetingsController.kt similarity index 80% rename from vent-backend/src/main/kotlin/com/hernil/vent/controllers/GreetingsController.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/GreetingsController.kt index a6c7577..143afd4 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/GreetingsController.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/GreetingsController.kt @@ -1,7 +1,7 @@ -package com.hernil.vent.controllers +package com.hernil.vent.application.controllers -import com.hernil.vent.domain.Greeting -import com.hernil.vent.services.DataRepository +import com.hernil.vent.application.domain.Greeting +import com.hernil.vent.application.services.DataRepository import org.springframework.web.bind.annotation.CrossOrigin import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestParam diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/StudentController.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/StudentController.kt similarity index 74% rename from vent-backend/src/main/kotlin/com/hernil/vent/controllers/StudentController.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/StudentController.kt index fa90238..a0d8e28 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/controllers/StudentController.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/controllers/StudentController.kt @@ -1,7 +1,6 @@ -package com.hernil.vent.controllers +package com.hernil.vent.application.controllers -import com.hernil.vent.domain.StudentRepository -import com.hernil.vent.protus.LearnersRepository +import com.hernil.vent.protus.domain.LearnersRepository import org.springframework.web.bind.annotation.* @RestController diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Course.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Course.kt similarity index 71% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Course.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Course.kt index 896e36d..399a871 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Course.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Course.kt @@ -1,10 +1,12 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain -import com.hernil.vent.domain.mappers.CourseStudents +import com.hernil.vent.application.domain.mappers.CourseStudents import org.springframework.data.jpa.repository.JpaRepository +import org.springframework.stereotype.Repository import javax.persistence.* @Entity +//@Table(name = "course") data class Course(@Id @GeneratedValue(strategy = GenerationType.AUTO) val id: Long = 0, @@ -15,4 +17,5 @@ data class Course(@Id ) { } +@Repository interface CourseRepository : JpaRepository \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Data.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Data.kt similarity index 81% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Data.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Data.kt index 3d7c70a..39a5949 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Data.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Data.kt @@ -1,8 +1,9 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain import javax.persistence.* @Entity +@Table(name = "data") data class Data(val name: String = "", @ElementCollection val data: List = listOf(0.0), diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Greeting.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Greeting.kt similarity index 56% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Greeting.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Greeting.kt index 547effb..bc52d2d 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Greeting.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Greeting.kt @@ -1,3 +1,3 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain data class Greeting(val id: Long, val content: String) \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Person.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Person.kt similarity index 70% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Person.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Person.kt index cb66908..b40b568 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Person.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Person.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain open class Person(open val name: String) { fun test() { diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Student.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Student.kt similarity index 73% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Student.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Student.kt index a78221f..469c9da 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Student.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Student.kt @@ -1,7 +1,8 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain -import com.hernil.vent.domain.mappers.CourseStudents +import com.hernil.vent.application.domain.mappers.CourseStudents import org.springframework.data.jpa.repository.JpaRepository +import org.springframework.stereotype.Repository import javax.persistence.* @Entity @@ -14,4 +15,5 @@ data class Student(@Id ) : Person(name) { } +@Repository interface StudentRepository : JpaRepository \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Teacher.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Teacher.kt similarity index 88% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/Teacher.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Teacher.kt index 9b4fa10..652b92b 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/Teacher.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/Teacher.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.domain +package com.hernil.vent.application.domain import javax.persistence.Entity import javax.persistence.GeneratedValue diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/domain/mappers/CourseStudents.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/mappers/CourseStudents.kt similarity index 87% rename from vent-backend/src/main/kotlin/com/hernil/vent/domain/mappers/CourseStudents.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/application/domain/mappers/CourseStudents.kt index 308da8f..81a69fc 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/domain/mappers/CourseStudents.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/domain/mappers/CourseStudents.kt @@ -1,9 +1,9 @@ -package com.hernil.vent.domain.mappers +package com.hernil.vent.application.domain.mappers import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonIgnoreProperties -import com.hernil.vent.domain.Course -import com.hernil.vent.domain.Student +import com.hernil.vent.application.domain.Course +import com.hernil.vent.application.domain.Student import java.io.Serializable import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/application/services/DataRepository.kt b/vent-backend/src/main/kotlin/com/hernil/vent/application/services/DataRepository.kt new file mode 100644 index 0000000..12f20a4 --- /dev/null +++ b/vent-backend/src/main/kotlin/com/hernil/vent/application/services/DataRepository.kt @@ -0,0 +1,8 @@ +package com.hernil.vent.application.services + +import com.hernil.vent.application.domain.Data +import org.springframework.data.jpa.repository.JpaRepository +import org.springframework.stereotype.Repository + +@Repository +interface DataRepository : JpaRepository \ No newline at end of file diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/ActionTypeEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ActionTypeEntity.kt similarity index 91% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/ActionTypeEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ActionTypeEntity.kt index b182b5d..be3f777 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/ActionTypeEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ActionTypeEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/CoursesEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/CoursesEntity.kt similarity index 94% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/CoursesEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/CoursesEntity.kt index 146a84f..25bdb21 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/CoursesEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/CoursesEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersAnswersEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersAnswersEntity.kt similarity index 92% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersAnswersEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersAnswersEntity.kt index cf7cd1b..79f1618 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersAnswersEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersAnswersEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersEntity.kt similarity index 97% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersEntity.kt index a9e3d64..bb9b4a8 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LearnersEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LearnersEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import org.springframework.data.jpa.repository.JpaRepository import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LessonsEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LessonsEntity.kt similarity index 96% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/LessonsEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LessonsEntity.kt index 5ac4701..df72fde 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/LessonsEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/LessonsEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/MessagesEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/MessagesEntity.kt similarity index 94% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/MessagesEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/MessagesEntity.kt index 479ce37..9ceae7f 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/MessagesEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/MessagesEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* import java.sql.Timestamp diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/OfferedAnswersEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/OfferedAnswersEntity.kt similarity index 96% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/OfferedAnswersEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/OfferedAnswersEntity.kt index 9d0d854..38ba449 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/OfferedAnswersEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/OfferedAnswersEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/ResursEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ResursEntity.kt similarity index 88% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/ResursEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ResursEntity.kt index bcc5abd..914e3cd 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/ResursEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/ResursEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/SessionEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SessionEntity.kt similarity index 92% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/SessionEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SessionEntity.kt index 43ba688..eea444c 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/SessionEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SessionEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* import java.sql.Time diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/SettingsEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SettingsEntity.kt similarity index 94% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/SettingsEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SettingsEntity.kt index 2668ef2..140a13c 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/SettingsEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/SettingsEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TagsEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TagsEntity.kt similarity index 90% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/TagsEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TagsEntity.kt index b4c9824..dbdba42 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TagsEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TagsEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TeachersEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TeachersEntity.kt similarity index 94% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/TeachersEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TeachersEntity.kt index db88589..6c48992 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TeachersEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TeachersEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TestEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TestEntity.kt similarity index 92% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/TestEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TestEntity.kt index 08850fc..3a77093 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/TestEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/TestEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* import java.sql.Timestamp diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/UnitsEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UnitsEntity.kt similarity index 88% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/UnitsEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UnitsEntity.kt index 947229e..808fa29 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/UnitsEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UnitsEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/protus/UsersActionEntity.kt b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UsersActionEntity.kt similarity index 96% rename from vent-backend/src/main/kotlin/com/hernil/vent/protus/UsersActionEntity.kt rename to vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UsersActionEntity.kt index 8aa2b50..129f972 100644 --- a/vent-backend/src/main/kotlin/com/hernil/vent/protus/UsersActionEntity.kt +++ b/vent-backend/src/main/kotlin/com/hernil/vent/protus/domain/UsersActionEntity.kt @@ -1,4 +1,4 @@ -package com.hernil.vent.protus +package com.hernil.vent.protus.domain import javax.persistence.* import java.sql.Timestamp diff --git a/vent-backend/src/main/kotlin/com/hernil/vent/services/DataRepository.kt b/vent-backend/src/main/kotlin/com/hernil/vent/services/DataRepository.kt deleted file mode 100644 index c56d433..0000000 --- a/vent-backend/src/main/kotlin/com/hernil/vent/services/DataRepository.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.hernil.vent.services - -import com.hernil.vent.domain.Data -import org.springframework.data.jpa.repository.JpaRepository - -interface DataRepository : JpaRepository \ No newline at end of file