Entidades Travel y User.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
# Okupa un coche
|
||||
|
||||
# Okupa mi coche
|
||||
Gestión de viajes en el valle.
|
||||
|
||||
18
src/main/kotlin/eu/fosil/okupamicoche/entities/Travel.kt
Normal file
18
src/main/kotlin/eu/fosil/okupamicoche/entities/Travel.kt
Normal file
@@ -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<User>,
|
||||
var departureDate: String,
|
||||
var from: String,
|
||||
var to: String,
|
||||
var availablePlaces: Int,
|
||||
var description: String? = null,
|
||||
var matrixRoomId: String
|
||||
)
|
||||
12
src/main/kotlin/eu/fosil/okupamicoche/entities/User.kt
Normal file
12
src/main/kotlin/eu/fosil/okupamicoche/entities/User.kt
Normal file
@@ -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)
|
||||
@@ -1,4 +1,4 @@
|
||||
package eu.fosil.okupamicoche
|
||||
package eu.fosil.okupamicoche.spring
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user