add NodeEntity
This commit is contained in:
7
cql/01-nodes.cql
Normal file
7
cql/01-nodes.cql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-- Create a table
|
||||||
|
CREATE TABLE IF NOT EXISTS device_configuration.nodes
|
||||||
|
(
|
||||||
|
id UUID PRIMARY KEY,
|
||||||
|
timestamp TIMESTAMP,
|
||||||
|
configuration TEXT
|
||||||
|
);
|
||||||
14
src/main/kotlin/ltd/hlaeja/entity/NodeEntity.kt
Normal file
14
src/main/kotlin/ltd/hlaeja/entity/NodeEntity.kt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package ltd.hlaeja.entity
|
||||||
|
|
||||||
|
import java.time.Instant
|
||||||
|
import java.util.UUID
|
||||||
|
import org.springframework.data.cassandra.core.mapping.PrimaryKey
|
||||||
|
import org.springframework.data.cassandra.core.mapping.Table
|
||||||
|
|
||||||
|
@Table("nodes")
|
||||||
|
data class NodeEntity(
|
||||||
|
@PrimaryKey
|
||||||
|
val id: UUID,
|
||||||
|
val timestamp: Instant,
|
||||||
|
val configuration: String,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user