-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
144 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
gateway/rdb/src/main/kotlin/org/doorip/gateway/rdb/trip/AllocatorJpaEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.doorip.gateway.rdb.trip | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.GeneratedValue | ||
import jakarta.persistence.GenerationType | ||
import jakarta.persistence.Id | ||
import jakarta.persistence.Table | ||
|
||
@Table(name = "allocator") | ||
@Entity | ||
internal class AllocatorJpaEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "allocator_id", columnDefinition = "bigint", nullable = false) | ||
var id: Long = 0 | ||
protected set | ||
} |
24 changes: 24 additions & 0 deletions
24
gateway/rdb/src/main/kotlin/org/doorip/gateway/rdb/trip/ParticipantJpaEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.doorip.gateway.rdb.trip | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Embedded | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.GeneratedValue | ||
import jakarta.persistence.GenerationType | ||
import jakarta.persistence.Id | ||
import jakarta.persistence.Table | ||
import org.doorip.domain.trip.PropensityTag | ||
|
||
@Table(name = "participant") | ||
@Entity | ||
internal class ParticipantJpaEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "participant_id", columnDefinition = "bigint", nullable = false) | ||
var id: Long = 0 | ||
protected set | ||
|
||
@Embedded | ||
lateinit var propensityTag: PropensityTag | ||
protected set | ||
} |
18 changes: 18 additions & 0 deletions
18
gateway/rdb/src/main/kotlin/org/doorip/gateway/rdb/trip/PropensityTag.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.doorip.gateway.rdb.trip | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Embeddable | ||
|
||
@Embeddable | ||
data class PropensityTag( | ||
@Column(name = "style_a", columnDefinition = "integer") | ||
val styleA: Int, | ||
@Column(name = "style_b", columnDefinition = "integer") | ||
val styleB: Int, | ||
@Column(name = "style_c", columnDefinition = "integer") | ||
val styleC: Int, | ||
@Column(name = "style_d", columnDefinition = "integer") | ||
val styleD: Int, | ||
@Column(name = "style_e", columnDefinition = "integer") | ||
val styleE: Int, | ||
) |
45 changes: 45 additions & 0 deletions
45
gateway/rdb/src/main/kotlin/org/doorip/gateway/rdb/trip/TodoJpaEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package org.doorip.gateway.rdb.trip | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.EnumType | ||
import jakarta.persistence.Enumerated | ||
import jakarta.persistence.GeneratedValue | ||
import jakarta.persistence.GenerationType | ||
import jakarta.persistence.Id | ||
import jakarta.persistence.Table | ||
import java.time.LocalDate | ||
import org.doorip.domain.trip.TodoStatus | ||
import org.doorip.domain.trip.TodoType | ||
|
||
@Table(name = "todo") | ||
@Entity | ||
internal class TodoJpaEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "todo_id", columnDefinition = "bigint", nullable = false) | ||
var id: Long = 0 | ||
protected set | ||
|
||
@Column(name = "title", columnDefinition = "varchar(255)", nullable = false) | ||
lateinit var title: String | ||
protected set | ||
|
||
@Column(name = "end_date", columnDefinition = "date", nullable = false) | ||
lateinit var endDate: LocalDate | ||
protected set | ||
|
||
@Column(name = "memo", columnDefinition = "text", nullable = true) | ||
var memo: String? = null | ||
protected set | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "secret", columnDefinition = "enum('OUR', 'MY')", nullable = false) | ||
lateinit var todoType: TodoType | ||
protected set | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "progress", columnDefinition = "enum('incomplete', 'complete')", nullable = false) | ||
lateinit var todoStatus: TodoStatus | ||
protected set | ||
} |
35 changes: 35 additions & 0 deletions
35
gateway/rdb/src/main/kotlin/org/doorip/gateway/rdb/trip/TripJpaEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.doorip.gateway.rdb.trip | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.GeneratedValue | ||
import jakarta.persistence.GenerationType | ||
import jakarta.persistence.Id | ||
import jakarta.persistence.Table | ||
import java.time.LocalDate | ||
|
||
@Table(name = "trip") | ||
@Entity | ||
internal class TripJpaEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "trip_id", columnDefinition = "bigint", nullable = false) | ||
var id: Long = 0 | ||
protected set | ||
|
||
@Column(name = "code", columnDefinition = "varchar(255)", nullable = false) | ||
lateinit var code: String | ||
protected set | ||
|
||
@Column(name = "title", columnDefinition = "varchar(255)", nullable = false) | ||
lateinit var title: String | ||
protected set | ||
|
||
@Column(name = "start_date", columnDefinition = "date", nullable = false) | ||
lateinit var startDate: LocalDate | ||
protected set | ||
|
||
@Column(name = "end_date", columnDefinition = "date", nullable = false) | ||
lateinit var endDate: LocalDate | ||
protected set | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters