Pinned chat room

This commit is contained in:
2025-12-22 00:04:23 +08:00
parent 2df31e4244
commit a481b1b82f
11 changed files with 1074 additions and 472 deletions

View File

@@ -38,8 +38,13 @@ class ListMapConverter
class Realms extends Table {
TextColumn get id => text()();
TextColumn get slug => text()();
TextColumn get name => text().nullable()();
TextColumn get description => text().nullable()();
TextColumn get verifiedAs => text().nullable()();
DateTimeColumn get verifiedAt => dateTime().nullable()();
BoolColumn get isCommunity => boolean()();
BoolColumn get isPublic => boolean()();
TextColumn get picture => text().map(const MapConverter()).nullable()();
TextColumn get background => text().map(const MapConverter()).nullable()();
TextColumn get accountId => text().nullable()();
@@ -64,6 +69,8 @@ class ChatRooms extends Table {
TextColumn get background => text().map(const MapConverter()).nullable()();
TextColumn get realmId => text().references(Realms, #id).nullable()();
TextColumn get accountId => text().nullable()();
BoolColumn get isPinned =>
boolean().nullable().withDefault(const Constant(false))();
DateTimeColumn get createdAt => dateTime()();
DateTimeColumn get updatedAt => dateTime()();
DateTimeColumn get deletedAt => dateTime().nullable()();