A decentralized music tracking and discovery platform built on AT Protocol 馃幍
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
1import { type InferSelectModel, sql } from "drizzle-orm";
2import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
3import users from "./users";
4
5const webscrobblers = pgTable("webscrobblers", {
6 id: text("xata_id").primaryKey().default(sql`xata_id()`),
7 name: text("name").notNull(),
8 uuid: text("uuid").notNull(),
9 description: text("description"),
10 enabled: boolean("enabled").default(true).notNull(),
11 userId: text("user_id")
12 .notNull()
13 .references(() => users.id),
14 createdAt: timestamp("xata_createdat").defaultNow().notNull(),
15 updatedAt: timestamp("xata_updatedat").defaultNow().notNull(),
16});
17
18export type SelectWebscrobblers = InferSelectModel<typeof webscrobblers>;
19export type InsertWebscrobblers = InferSelectModel<typeof webscrobblers>;
20
21export default webscrobblers;