mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 11:39:39 +02:00
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
21 lines
901 B
TypeScript
21 lines
901 B
TypeScript
import { pgTable, uuid, text, integer, timestamp } from 'drizzle-orm/pg-core';
|
|
|
|
/**
|
|
* Nutrition goals table - stores user's daily nutrition targets
|
|
*/
|
|
export const nutritionGoals = pgTable('nutrition_goals', {
|
|
id: uuid('id').primaryKey().defaultRandom(),
|
|
userId: text('user_id').notNull().unique(),
|
|
caloriesTarget: integer('calories_target').notNull(),
|
|
proteinTarget: integer('protein_target').notNull(),
|
|
carbsTarget: integer('carbs_target').notNull(),
|
|
fatTarget: integer('fat_target').notNull(),
|
|
fiberTarget: integer('fiber_target'),
|
|
sugarLimit: integer('sugar_limit'),
|
|
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
|
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
|
});
|
|
|
|
// Type exports
|
|
export type NutritionGoal = typeof nutritionGoals.$inferSelect;
|
|
export type NewNutritionGoal = typeof nutritionGoals.$inferInsert;
|