forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1import type { InferInsertModel, InferSelectModel } from "drizzle-orm";
2import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core";
3
4const artists = pgTable("artists", {
5 id: text("xata_id").primaryKey(),
6 name: text("name").notNull(),
7 biography: text("biography"),
8 born: timestamp("born"),
9 bornIn: text("born_in"),
10 died: timestamp("died"),
11 picture: text("picture"),
12 sha256: text("sha256").unique().notNull(),
13 uri: text("uri").unique(),
14 appleMusicLink: text("apple_music_link"),
15 spotifyLink: text("spotify_link"),
16 tidalLink: text("tidal_link"),
17 youtubeLink: text("youtube_link"),
18 createdAt: timestamp("xata_createdat").defaultNow().notNull(),
19 updatedAt: timestamp("xata_updatedat").defaultNow().notNull(),
20 xataVersion: integer("xata_version"),
21});
22
23export type SelectArtist = InferSelectModel<typeof artists>;
24export type InsertArtist = InferInsertModel<typeof artists>;
25
26export default artists;