Entidades Travel y User.

This commit is contained in:
Eneko Nieto
2021-01-04 13:37:16 +01:00
parent 12a4a378f6
commit c95c094e13
5 changed files with 34 additions and 4 deletions

View File

@@ -1,2 +1,2 @@
# Okupa un coche
# Okupa mi coche
Gestión de viajes en el valle.

View 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
)

View 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)

View File

@@ -1,4 +1,4 @@
package eu.fosil.okupamicoche
package eu.fosil.okupamicoche.spring
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication

View File

@@ -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