Sifa professional network API (Fastify, AT Protocol, Jetstream) sifa.id/
at main 34 lines 1.5 kB view raw
1import { doublePrecision, integer, pgTable, text, timestamp, index } from 'drizzle-orm/pg-core'; 2 3export const profiles = pgTable( 4 'profiles', 5 { 6 did: text('did').primaryKey(), 7 handle: text('handle').notNull(), 8 displayName: text('display_name'), 9 avatarUrl: text('avatar_url'), 10 headline: text('headline'), 11 about: text('about'), 12 headlineOverride: text('headline_override'), 13 aboutOverride: text('about_override'), 14 displayNameOverride: text('display_name_override'), 15 avatarUrlOverride: text('avatar_url_override'), 16 industry: text('industry'), 17 locationCountry: text('location_country'), 18 locationRegion: text('location_region'), 19 locationCity: text('location_city'), 20 countryCode: text('country_code'), 21 latitude: doublePrecision('latitude'), 22 longitude: doublePrecision('longitude'), 23 openTo: text('open_to').array(), 24 preferredWorkplace: text('preferred_workplace').array(), 25 langs: text('langs').array(), 26 pdsHost: text('pds_host'), 27 createdAt: timestamp('created_at', { withTimezone: true }).notNull(), 28 indexedAt: timestamp('indexed_at', { withTimezone: true }).notNull().defaultNow(), 29 updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow(), 30 lastActiveAt: timestamp('last_active_at', { withTimezone: true }), 31 pdsRewriteVersion: integer('pds_rewrite_version').notNull().default(0), 32 }, 33 (table) => [index('idx_profiles_handle').on(table.handle)], 34);