Compare commits
2 Commits
renovate/n
...
bb674240bb
| Author | SHA1 | Date | |
|---|---|---|---|
| bb674240bb | |||
| 5a34e5994e |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
target/
|
||||
.idea/
|
||||
scripts/
|
||||
*.sqlite
|
||||
42
pom.xml
42
pom.xml
@@ -94,6 +94,48 @@
|
||||
<version>5.13.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Spring + JPA stack (non-Boot setup) -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>6.2.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>6.2.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
<version>6.2.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-jpa</artifactId>
|
||||
<version>3.3.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Hibernate core + SQLite dialects -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>6.6.1.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-community-dialects</artifactId>
|
||||
<version>6.6.1.Final</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jakarta Persistence API (usually provided via Hibernate, but include explicitly for compile-time types) -->
|
||||
<dependency>
|
||||
<groupId>jakarta.persistence</groupId>
|
||||
<artifactId>jakarta.persistence-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- override dependencies to use newer versions -->
|
||||
|
||||
@@ -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