feat: Enhance task filtering, smart scheduling, audit logs and translations
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+12
-1
@@ -28,6 +28,14 @@ export const users = pgTable("users", {
|
||||
otpCode: text("otp_code"), // The temporary 6-digit code
|
||||
otpExpiresAt: timestamp("otp_expires_at"),
|
||||
language: text("language").notNull().default("en"), // 'en' | 'de'
|
||||
workHours: json("work_hours").$type<{ start: string, end: string, days: number[] }>().default({ start: "09:00", end: "17:00", days: [1, 2, 3, 4, 5] }), // Deprecated in favor of availability? Keeping for now.
|
||||
availability: json("availability").$type<{
|
||||
work: { start: string, end: string, days: number[] },
|
||||
personal: { start: string, end: string, days: number[] }
|
||||
}>().default({
|
||||
work: { start: "09:00", end: "17:00", days: [1, 2, 3, 4, 5] },
|
||||
personal: { start: "18:00", end: "22:00", days: [1, 2, 3, 4, 5, 0, 6] } // Mon-Fri Evening + Weekend
|
||||
}),
|
||||
});
|
||||
|
||||
export const systemSettings = pgTable("system_settings", {
|
||||
@@ -41,7 +49,8 @@ export const labels = pgTable("labels", {
|
||||
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
|
||||
name: text("name").notNull(),
|
||||
color: text("color").notNull(),
|
||||
creatorId: varchar("creator_id").references(() => users.id), // Added creator ownership
|
||||
creatorId: varchar("creator_id").references(() => users.id),
|
||||
domain: text("domain").notNull().default("neutral"), // 'work' | 'personal' | 'neutral'
|
||||
});
|
||||
|
||||
export const sharedLabels = pgTable("shared_labels", {
|
||||
@@ -105,6 +114,8 @@ export const insertUserSchema = createInsertSchema(users).pick({
|
||||
isSearchable: true,
|
||||
aiEnabled: true,
|
||||
language: true,
|
||||
workHours: true,
|
||||
availability: true,
|
||||
});
|
||||
|
||||
export const registerSchema = insertUserSchema;
|
||||
|
||||
Reference in New Issue
Block a user