feat: Add email signature feature

- Add email_signatures table to schema
- Add email signature service, controller, routes
- Users can create/edit signature in Profile
- Toggle to include signature when sending email replies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2026-01-17 19:11:51 +01:00
parent 514b6c8a92
commit 0523087961
5 changed files with 292 additions and 0 deletions

View File

@@ -310,6 +310,21 @@ export const services = pgTable('services', {
updatedAt: timestamp('updated_at').defaultNow().notNull(),
});
// Email Signatures table - email podpisy používateľov
export const emailSignatures = pgTable('email_signatures', {
id: uuid('id').primaryKey().defaultRandom(),
userId: uuid('user_id').references(() => users.id, { onDelete: 'cascade' }).notNull().unique(),
fullName: text('full_name'),
position: text('position'),
phone: text('phone'),
email: text('email'),
companyName: text('company_name'),
website: text('website'),
isEnabled: boolean('is_enabled').default(true).notNull(),
createdAt: timestamp('created_at').defaultNow().notNull(),
updatedAt: timestamp('updated_at').defaultNow().notNull(),
});
// Messages table - interná komunikácia medzi používateľmi
export const messages = pgTable('messages', {
id: uuid('id').primaryKey().defaultRandom(),