feat: default locale Russian, geo determines language for other countries
- localization-svc: defaultLocale ru, resolveLocale only by geo - web-svc: DEFAULT_LOCALE ru, layout lang=ru, embeddedTranslations fallback ru - countryToLocale: default ru when no country or unknown country Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
services/profile-svc/src/db/schema.ts
Normal file
25
services/profile-svc/src/db/schema.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { jsonb, pgTable, text, timestamp } from 'drizzle-orm/pg-core';
|
||||
|
||||
/**
|
||||
* Профиль пользователя: личные данные и персонализация
|
||||
* user_id — из auth-svc (better-auth)
|
||||
*/
|
||||
export const userProfiles = pgTable('user_profiles', {
|
||||
userId: text('user_id').primaryKey(),
|
||||
/** Отображаемое имя (может отличаться от auth) */
|
||||
displayName: text('display_name'),
|
||||
/** URL аватара */
|
||||
avatarUrl: text('avatar_url'),
|
||||
/** Часовой пояс (IANA, напр. Europe/Moscow) */
|
||||
timezone: text('timezone'),
|
||||
/** Локаль (напр. ru, en-US) */
|
||||
locale: text('locale'),
|
||||
/** Личные данные (расширяемые): bio, links и т.п. */
|
||||
profileData: jsonb('profile_data').$type<Record<string, unknown>>().default({}),
|
||||
/** Preferences: theme, measureUnit, autoMediaSearch, showWeatherWidget и т.д. */
|
||||
preferences: jsonb('preferences').$type<Record<string, unknown>>().default({}),
|
||||
/** Персонализация: systemInstructions, responseFormat и т.д. */
|
||||
personalization: jsonb('personalization').$type<Record<string, unknown>>().default({}),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
});
|
||||
Reference in New Issue
Block a user