feat(automatic-backup-to-usb) - done v1
This commit is contained in:
@@ -29,6 +29,7 @@ model User {
|
||||
insuranceCredentials InsuranceCredential[]
|
||||
updatedPayments Payment[] @relation("PaymentUpdatedBy")
|
||||
backups DatabaseBackup[]
|
||||
backupDestinations BackupDestination[]
|
||||
notifications Notification[]
|
||||
cloudFolders CloudFolder[]
|
||||
cloudFiles CloudFile[]
|
||||
@@ -301,6 +302,7 @@ enum PaymentMethod {
|
||||
OTHER
|
||||
}
|
||||
|
||||
// Database management page
|
||||
model DatabaseBackup {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
@@ -312,6 +314,16 @@ model DatabaseBackup {
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
model BackupDestination {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
path String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
}
|
||||
|
||||
model Notification {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { DatabaseBackupUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
||||
import { DatabaseBackupUncheckedCreateInputObjectSchema, BackupDestinationUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
||||
import { z } from "zod";
|
||||
|
||||
export type DatabaseBackup = z.infer<
|
||||
typeof DatabaseBackupUncheckedCreateInputObjectSchema
|
||||
>;
|
||||
|
||||
export type BackupDestination = z.infer<
|
||||
typeof BackupDestinationUncheckedCreateInputObjectSchema
|
||||
>;
|
||||
|
||||
@@ -16,6 +16,7 @@ export * from '../shared/schemas/enums/PaymentStatus.schema'
|
||||
export * from '../shared/schemas/enums/NotificationTypes.schema'
|
||||
export * from '../shared/schemas/objects/NotificationUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/DatabaseBackupUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/BackupDestinationUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CloudFolderUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CloudFileUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CommunicationUncheckedCreateInput.schema'
|
||||
Reference in New Issue
Block a user