diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-10-27 17:04:08 +0200 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-10-27 17:04:08 +0200 |
| commit | 31e3778061a20e0787c076d9353e82b2e223841e (patch) | |
| tree | ad95dad6c9d1d7df57314dd01787be4f23dc7549 /internal/data/chat.go | |
| parent | 9a1030a5799b4b5e4456152993732c3bff375888 (diff) | |
feat: add setup for SQL
Diffstat (limited to 'internal/data/chat.go')
| -rw-r--r-- | internal/data/chat.go | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/internal/data/chat.go b/internal/data/chat.go deleted file mode 100644 index ae5dc67..0000000 --- a/internal/data/chat.go +++ /dev/null @@ -1,55 +0,0 @@ -package data - -import ( - "github.com/kyren223/eko/pkg/snowflake" - "github.com/kyren223/eko/pkg/utils" -) - -// Represents an Eko Network, equivalent to a "discord server". -type Network struct { - id snowflake.ID - name string - frequencies []snowflake.ID -} - -// Represents an Eko Frequency, equivalent to a "discord channel" within a "discord server". -type Frequency struct { - id snowflake.ID - name string -} - -// Represents an Eko Signal, equivalent to a "discord message" between only 2 people. -type Signal struct { - userId1 snowflake.ID - userId2 snowflake.ID -} - -// Represents a message -type Message struct { - Id snowflake.ID - SenderId snowflake.ID - FrequencyId snowflake.ID - NetworkId snowflake.ID - Contents string -} - -func (a Message) CmpTimestamp(b Message) int { - cmpTime := a.Id.Time() - b.Id.Time() - if cmpTime != 0 { - return int(utils.Clamp(cmpTime, -1, 1)) - } - cmpStep := a.Id.Step() - b.Id.Step() - if cmpStep != 0 { - return int(utils.Clamp(cmpStep, -1, 1)) - } - cmpNode := a.Id.Node() - b.Id.Node() - if cmpNode != 0 { - return int(utils.Clamp(cmpNode, -1, 1)) - } - return 0 -} - -// Represents an Eko User -type User struct { - id snowflake.ID -} |
