initial commit
This commit is contained in:
31
ent/schema/actions.go
Normal file
31
ent/schema/actions.go
Normal file
@ -0,0 +1,31 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Actions holds the schema definition for the Actions entity.
|
||||
type Actions struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Actions.
|
||||
func (Actions) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("refid"),
|
||||
field.String("commiter"),
|
||||
field.String("serverid"),
|
||||
field.String("target"),
|
||||
field.String("type"),
|
||||
field.String("duration"),
|
||||
field.String("reason"),
|
||||
field.Bool("temp").Default(false),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Actions.
|
||||
func (Actions) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
26
ent/schema/authorizables.go
Normal file
26
ent/schema/authorizables.go
Normal file
@ -0,0 +1,26 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Authorizables holds the schema definition for the Authorizables entity.
|
||||
type Authorizables struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Authorizables.
|
||||
func (Authorizables) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("username"),
|
||||
field.String("password"),
|
||||
field.String("serverid"),
|
||||
field.String("userid"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Authorizables.
|
||||
func (Authorizables) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
25
ent/schema/blacklist.go
Normal file
25
ent/schema/blacklist.go
Normal file
@ -0,0 +1,25 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Blacklist holds the schema definition for the Blacklist entity.
|
||||
type Blacklist struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Blacklist.
|
||||
func (Blacklist) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("word"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Blacklist.
|
||||
func (Blacklist) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
27
ent/schema/logging.go
Normal file
27
ent/schema/logging.go
Normal file
@ -0,0 +1,27 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Logging holds the schema definition for the Logging entity.
|
||||
type Logging struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Logging.
|
||||
func (Logging) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("type"),
|
||||
field.String("commiter"),
|
||||
field.String("description"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Logging.
|
||||
func (Logging) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
28
ent/schema/punishments.go
Normal file
28
ent/schema/punishments.go
Normal file
@ -0,0 +1,28 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Punishments holds the schema definition for the Punishments entity.
|
||||
type Punishments struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Punishments.
|
||||
func (Punishments) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("warnamount"),
|
||||
field.String("actiontype"),
|
||||
field.String("duration"),
|
||||
field.String("reason"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Punishments.
|
||||
func (Punishments) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
27
ent/schema/servers.go
Normal file
27
ent/schema/servers.go
Normal file
@ -0,0 +1,27 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Servers holds the schema definition for the Servers entity.
|
||||
type Servers struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Servers.
|
||||
func (Servers) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("userid"),
|
||||
field.String("serverid"),
|
||||
field.Bool("isOwner"),
|
||||
field.String("permission"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Servers.
|
||||
func (Servers) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
48
ent/schema/settings.go
Normal file
48
ent/schema/settings.go
Normal file
@ -0,0 +1,48 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Settings holds the schema definition for the Settings entity.
|
||||
type Settings struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Settings.
|
||||
func (Settings) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("servername"),
|
||||
field.String("ownerid"),
|
||||
field.String("permtoken"),
|
||||
field.String("apitoken"),
|
||||
field.String("statspagemode"),
|
||||
field.String("loggerchannel"),
|
||||
field.String("spamchannel"),
|
||||
field.String("greeterchannel"),
|
||||
field.String("greetermode"),
|
||||
field.String("announcechannel"),
|
||||
field.Bool("logger").Default(false),
|
||||
field.Bool("spamprotection").Default(false),
|
||||
field.Bool("linkprotection").Default(false),
|
||||
field.Bool("wordfilter").Default(false),
|
||||
field.Bool("greetings").Default(false),
|
||||
field.Bool("apitoggle").Default(false),
|
||||
field.Bool("moderation").Default(false),
|
||||
field.Bool("automatedmoderation").Default(false),
|
||||
field.Bool("twitchannounce").Default(false),
|
||||
field.Bool("twitterannounce").Default(false),
|
||||
field.Bool("music").Default(false),
|
||||
field.Bool("statspage").Default(false),
|
||||
field.Bool("statsprivate").Default(false),
|
||||
field.Bool("stats").Default(false),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Settings.
|
||||
func (Settings) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
26
ent/schema/socialmedia.go
Normal file
26
ent/schema/socialmedia.go
Normal file
@ -0,0 +1,26 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Socialmedia holds the schema definition for the Socialmedia entity.
|
||||
type Socialmedia struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Socialmedia.
|
||||
func (Socialmedia) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("type"),
|
||||
field.String("identificator"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Socialmedia.
|
||||
func (Socialmedia) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
29
ent/schema/support.go
Normal file
29
ent/schema/support.go
Normal file
@ -0,0 +1,29 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Support holds the schema definition for the Support entity.
|
||||
type Support struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Support.
|
||||
func (Support) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("refid"),
|
||||
field.String("serverid"),
|
||||
field.String("creator"),
|
||||
field.String("status"),
|
||||
field.String("title"),
|
||||
field.String("description"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Support.
|
||||
func (Support) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
33
ent/schema/supportresponse.go
Normal file
33
ent/schema/supportresponse.go
Normal file
@ -0,0 +1,33 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// SupportResponse holds the schema definition for the SupportResponse entity.
|
||||
type SupportResponse struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the SupportResponse.
|
||||
func (SupportResponse) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("refid"),
|
||||
field.String("writer"),
|
||||
field.String("message"),
|
||||
field.String("type"),
|
||||
field.String("rtcchannel"),
|
||||
field.Bool("isread"),
|
||||
field.Time("created").Annotations(&entsql.Annotation{
|
||||
Default: "CURRENT_TIMESTAMP",
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the SupportResponse.
|
||||
func (SupportResponse) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
33
ent/schema/user.go
Normal file
33
ent/schema/user.go
Normal file
@ -0,0 +1,33 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// User holds the schema definition for the User entity.
|
||||
type User struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the User.
|
||||
func (User) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("serverid"),
|
||||
field.String("userid"),
|
||||
field.String("username"),
|
||||
field.Int("xp").Default(0),
|
||||
field.Int("level").Default(1),
|
||||
field.Int("msgs").Default(0),
|
||||
field.Time("created").Annotations(&entsql.Annotation{
|
||||
Default: "CURRENT_TIMESTAMP",
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the User.
|
||||
func (User) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
30
ent/schema/warns.go
Normal file
30
ent/schema/warns.go
Normal file
@ -0,0 +1,30 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Warns holds the schema definition for the Warns entity.
|
||||
type Warns struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Warns.
|
||||
func (Warns) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Unique(),
|
||||
field.String("emitter"),
|
||||
field.String("serverid"),
|
||||
field.String("target"),
|
||||
field.String("type"),
|
||||
field.String("duration"),
|
||||
field.String("reason"),
|
||||
field.String("refid").Unique(),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Warns.
|
||||
func (Warns) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user