added more database data structures to show the next directions

This commit is contained in:
2025-10-24 21:51:48 -06:00
parent b93bc93e00
commit 86540e00b1
3 changed files with 62 additions and 1 deletions
+9 -1
View File
@@ -37,6 +37,14 @@ type Conference struct {
Color *string `db:"color"`
}
type ConferenceSettings struct {
ConfId int32 `db:"confid"`
Uid int32 `db:"uid"`
DefaultPseud *string `db:"default_pseud"`
LastRead *time.Time `db:"last_read"`
LastPost *time.Time `db:"last_post"`
}
// conferenceCache is the cache for Conference objects.
var conferenceCache *lru.TwoQueueCache = nil
@@ -198,7 +206,7 @@ func AmGetConferenceByAlias(alias string) (*Conference, error) {
/* AmGetCommunityConferences returns all conferences for a given community.
* Parameters:
* cid - COmmunity ID to get conferences for.
* cid - Community ID to get conferences for.
* showHidden - true to show hidden conferences.
* Returns:
* Array containing the COnference pointers, or nil.
+17
View File
@@ -0,0 +1,17 @@
/*
* Amsterdam Web Communities System
* Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
// The database package contains database management and storage logic.
package database
type ConferenceHotlist struct {
Uid int32 `db:"uid"`
Sequence int16 `db:"sequence"`
CommId int32 `db:"commid"`
ConfId int32 `db:"confid"`
}
+36
View File
@@ -0,0 +1,36 @@
/*
* Amsterdam Web Communities System
* Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
// The database package contains database management and storage logic.
package database
import "time"
type Topic struct {
TopicId int32 `db:"topicid"`
ConfId int32 `db:"confid"`
Number int16 `db:"num"`
CreatorUid int32 `db:"creator_uid"`
TopMessage int32 `db:"top_message"`
Frozen bool `db:"frozen"`
Archived bool `db:"archived"`
Sticky bool `db:"sticky"`
CreateDate time.Time `db:"createdate"`
LastUpdate time.Time `db:"lastupdate"`
Name string `db:"name"`
}
type TopicSettings struct {
TopicId int32 `db:"topicid"`
Uid int32 `db:"uid"`
Hidden bool `db:"hidden"`
LastMessage int32 `db:"last_message"`
LastRead *time.Time `db:"last_read"`
LastPost *time.Time `db:"last_post"`
Subscribe bool `db:"subscribe"`
}