move lootbox cooldown to redis because of timezone garbage

This commit is contained in:
2025-11-23 22:35:13 +01:00
parent 55ad3d3b1c
commit d9c9f0c217
3 changed files with 25 additions and 10 deletions

View File

@@ -13,8 +13,7 @@ export const users = pgTable('users', {
id: integer().primaryKey().notNull(),
username: varchar().notNull(),
balance: integer().default(0).notNull(),
inventory: jsonb().$type<inventory>().default({}).notNull(),
lastlootbox: timestamp().default(new Date(0)).notNull()
inventory: jsonb().$type<inventory>().default({}).notNull()
});
export const usersRelations = relations(users, ({ many }) => ({