feat: Add farba field and company details to AI Kurzy module

- Add farba (color) field to kurzy schema and Zod validation
- Add company detail fields (firma_ico, firma_dic, firma_ic_dph, firma_sidlo) to ucastnici
- Remove console logs from ai-kurzy service
- Add SQL migration scripts for schema updates and data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2026-01-21 14:27:03 +01:00
parent 4089bb4be2
commit 826fd467bc
5 changed files with 197 additions and 2 deletions

View File

@@ -435,6 +435,7 @@ export const kurzy = pgTable('kurzy', {
cena: numeric('cena', { precision: 10, scale: 2 }).notNull(),
maxKapacita: integer('max_kapacita'),
aktivny: boolean('aktivny').default(true).notNull(),
farba: varchar('farba', { length: 20 }), // Color for visual distinction (e.g., 'primary', 'info', 'warning')
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
});
@@ -448,6 +449,10 @@ export const ucastnici = pgTable('ucastnici', {
email: varchar('email', { length: 255 }).notNull().unique(),
telefon: varchar('telefon', { length: 50 }),
firma: varchar('firma', { length: 255 }),
firmaIco: varchar('firma_ico', { length: 20 }), // IČO spoločnosti
firmaDic: varchar('firma_dic', { length: 20 }), // DIČ spoločnosti
firmaIcDph: varchar('firma_ic_dph', { length: 25 }), // IČ DPH spoločnosti
firmaSidlo: text('firma_sidlo'), // Sídlo firmy (full address)
mesto: varchar('mesto', { length: 100 }),
ulica: varchar('ulica', { length: 255 }),
psc: varchar('psc', { length: 10 }),