Created
December 22, 2023 14:31
-
-
Save mihaita-tinta/ba2ede49dcc82161632e27d4cf192ba1 to your computer and use it in GitHub Desktop.
Simple entity stored in cassandra
This file contains hidden or 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
package com.mih.playground.driver; | |
import org.springframework.data.cassandra.core.mapping.PrimaryKey; | |
import org.springframework.data.cassandra.core.mapping.Table; | |
import java.time.ZonedDateTime; | |
import java.util.UUID; | |
@Table | |
public class Driver { | |
@PrimaryKey | |
private UUID id; | |
private final Long startTimestamp; | |
private final String nickname; | |
public Driver(UUID id, Long startTimestamp, String nickname) { | |
this.id = id; | |
this.startTimestamp = startTimestamp; | |
this.nickname = nickname; | |
} | |
public UUID getId() { | |
return id; | |
} | |
public void setId(UUID id) { | |
this.id = id; | |
} | |
public Long getStartTimestamp() { | |
return startTimestamp; | |
} | |
public String getNickname() { | |
return nickname; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment