(wip) switch to spring/hibernate
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
target/
|
target/
|
||||||
.idea/
|
.idea/
|
||||||
*.sqlite
|
scripts/
|
||||||
|
*.sqlite
|
||||||
|
@@ -0,0 +1,77 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "command_runners")
|
||||||
|
public class CommandRunner
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "guild_id", nullable = false)
|
||||||
|
private String guildId;
|
||||||
|
|
||||||
|
@Column(name = "channel_id", nullable = false)
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
|
@Column(name = "user_id", nullable = false)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column(name = "channel_type", nullable = false)
|
||||||
|
private String channelType; // store JDA enum name
|
||||||
|
|
||||||
|
public String getMessageId()
|
||||||
|
{
|
||||||
|
return messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageId(String messageId)
|
||||||
|
{
|
||||||
|
this.messageId = messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuildId()
|
||||||
|
{
|
||||||
|
return guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuildId(String guildId)
|
||||||
|
{
|
||||||
|
this.guildId = guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId()
|
||||||
|
{
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelId(String channelId)
|
||||||
|
{
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelType()
|
||||||
|
{
|
||||||
|
return channelType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelType(String channelType)
|
||||||
|
{
|
||||||
|
this.channelType = channelType;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,64 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "pending_disabled_messages")
|
||||||
|
public class PendingDisabledMessage
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "guild_id", nullable = false)
|
||||||
|
private String guildId;
|
||||||
|
|
||||||
|
@Column(name = "channel_id", nullable = false)
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
|
@Column(name = "expiry_timestamp", nullable = false)
|
||||||
|
private String expiryTimestamp; // keep as String to match your format for now
|
||||||
|
|
||||||
|
public String getMessageId()
|
||||||
|
{
|
||||||
|
return messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageId(String messageId)
|
||||||
|
{
|
||||||
|
this.messageId = messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuildId()
|
||||||
|
{
|
||||||
|
return guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuildId(String guildId)
|
||||||
|
{
|
||||||
|
this.guildId = guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId()
|
||||||
|
{
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelId(String channelId)
|
||||||
|
{
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpiryTimestamp()
|
||||||
|
{
|
||||||
|
return expiryTimestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpiryTimestamp(String expiryTimestamp)
|
||||||
|
{
|
||||||
|
this.expiryTimestamp = expiryTimestamp;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,33 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "urban_dictionary")
|
||||||
|
public class UrbanDictionaryEntry
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "page", nullable = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@Column(name = "meanings", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String meanings;
|
||||||
|
|
||||||
|
@Column(name = "examples", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String examples;
|
||||||
|
|
||||||
|
@Column(name = "contributors", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String contributors;
|
||||||
|
|
||||||
|
@Column(name = "dates", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String dates;
|
||||||
|
|
||||||
|
@Column(name = "term", nullable = false)
|
||||||
|
private String term;
|
||||||
|
}
|
Reference in New Issue
Block a user