diff --git a/README.md b/README.md index 8061929..fd5e452 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Okupa un coche - +# Okupa mi coche +Gestión de viajes en el valle. diff --git a/src/main/kotlin/eu/fosil/okupamicoche/entities/Travel.kt b/src/main/kotlin/eu/fosil/okupamicoche/entities/Travel.kt new file mode 100644 index 0000000..d2ae0ec --- /dev/null +++ b/src/main/kotlin/eu/fosil/okupamicoche/entities/Travel.kt @@ -0,0 +1,18 @@ +package eu.fosil.okupamicoche.entities + +import javax.persistence.Entity +import javax.persistence.GeneratedValue +import javax.persistence.Id + +@Entity +class Travel( + @Id @GeneratedValue var id: Long? = null, + var driver: User, + var travelers: List, + var departureDate: String, + var from: String, + var to: String, + var availablePlaces: Int, + var description: String? = null, + var matrixRoomId: String +) \ No newline at end of file diff --git a/src/main/kotlin/eu/fosil/okupamicoche/entities/User.kt b/src/main/kotlin/eu/fosil/okupamicoche/entities/User.kt new file mode 100644 index 0000000..e168424 --- /dev/null +++ b/src/main/kotlin/eu/fosil/okupamicoche/entities/User.kt @@ -0,0 +1,12 @@ +package eu.fosil.okupamicoche.entities + +import javax.persistence.Entity +import javax.persistence.GeneratedValue +import javax.persistence.Id + +@Entity +class User( + @Id @GeneratedValue var id: Long? = null, + var matrixId: String, + var name: String, + var email: String) \ No newline at end of file diff --git a/src/main/kotlin/eu/fosil/okupamicoche/OkupaMiCocheApplication.kt b/src/main/kotlin/eu/fosil/okupamicoche/spring/OkupaMiCocheApplication.kt similarity index 87% rename from src/main/kotlin/eu/fosil/okupamicoche/OkupaMiCocheApplication.kt rename to src/main/kotlin/eu/fosil/okupamicoche/spring/OkupaMiCocheApplication.kt index 4e1f258..db341ff 100644 --- a/src/main/kotlin/eu/fosil/okupamicoche/OkupaMiCocheApplication.kt +++ b/src/main/kotlin/eu/fosil/okupamicoche/spring/OkupaMiCocheApplication.kt @@ -1,4 +1,4 @@ -package eu.fosil.okupamicoche +package eu.fosil.okupamicoche.spring import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication diff --git a/src/main/kotlin/eu/fosil/okupamicoche/ServletInitializer.kt b/src/main/kotlin/eu/fosil/okupamicoche/spring/ServletInitializer.kt similarity index 90% rename from src/main/kotlin/eu/fosil/okupamicoche/ServletInitializer.kt rename to src/main/kotlin/eu/fosil/okupamicoche/spring/ServletInitializer.kt index 0c52915..2bec19a 100644 --- a/src/main/kotlin/eu/fosil/okupamicoche/ServletInitializer.kt +++ b/src/main/kotlin/eu/fosil/okupamicoche/spring/ServletInitializer.kt @@ -1,4 +1,4 @@ -package eu.fosil.okupamicoche +package eu.fosil.okupamicoche.spring import org.springframework.boot.builder.SpringApplicationBuilder import org.springframework.boot.web.servlet.support.SpringBootServletInitializer