AGENTS.md: no direct commits to main, all changes via feature branches
This commit is contained in:
@@ -7,15 +7,11 @@ import (
|
||||
// Channel represents a chat channel.
|
||||
type Channel struct {
|
||||
Base
|
||||
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Topic string `json:"topic"`
|
||||
Modes string `json:"modes"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// Example relation method — will be fleshed out when we add channel_members:
|
||||
// func (c *Channel) Members(ctx context.Context) ([]*User, error) {
|
||||
// return c.DB().GetChannelMembers(ctx, c.ID)
|
||||
// }
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package models defines the data models used by the chat application.
|
||||
package models
|
||||
|
||||
import "database/sql"
|
||||
@@ -13,6 +14,7 @@ type Base struct {
|
||||
db DB
|
||||
}
|
||||
|
||||
// SetDB injects the database reference into a model.
|
||||
func (b *Base) SetDB(d DB) {
|
||||
b.db = d
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user