/****************************************************************************** * This file was generated by ZenStack CLI. ******************************************************************************/ /* eslint-disable */ // @ts-nocheck const metadata = { models: { account: { name: 'Account', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, userId: { name: "userId", type: "String", isForeignKey: true, relationField: 'user', }, type: { name: "type", type: "String", }, provider: { name: "provider", type: "String", }, providerAccountId: { name: "providerAccountId", type: "String", }, refresh_token: { name: "refresh_token", type: "String", isOptional: true, }, access_token: { name: "access_token", type: "String", isOptional: true, }, expires_at: { name: "expires_at", type: "Int", isOptional: true, }, token_type: { name: "token_type", type: "String", isOptional: true, }, scope: { name: "scope", type: "String", isOptional: true, }, id_token: { name: "id_token", type: "String", isOptional: true, }, session_state: { name: "session_state", type: "String", isOptional: true, }, user: { name: "user", type: "User", isDataModel: true, backLink: 'accounts', isRelationOwner: true, foreignKeyMapping: { "id": "userId" }, }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, provider_providerAccountId: { name: "provider_providerAccountId", fields: ["provider", "providerAccountId"] }, } , } , session: { name: 'Session', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, sessionToken: { name: "sessionToken", type: "String", }, userId: { name: "userId", type: "String", isForeignKey: true, relationField: 'user', }, expires: { name: "expires", type: "DateTime", }, user: { name: "user", type: "User", isDataModel: true, backLink: 'sessions', isRelationOwner: true, foreignKeyMapping: { "id": "userId" }, }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, sessionToken: { name: "sessionToken", fields: ["sessionToken"] }, } , } , verificationToken: { name: 'VerificationToken', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, identifier: { name: "identifier", type: "String", }, token: { name: "token", type: "String", }, expires: { name: "expires", type: "DateTime", }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, identifier_token: { name: "identifier_token", fields: ["identifier", "token"] }, } , } , user: { name: 'User', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, name: { name: "name", type: "String", isOptional: true, }, email: { name: "email", type: "String", isOptional: true, }, emailVerified: { name: "emailVerified", type: "DateTime", isOptional: true, }, image: { name: "image", type: "String", isOptional: true, }, role: { name: "role", type: "Role", }, password: { name: "password", type: "String", isOptional: true, }, authMethod: { name: "authMethod", type: "String", isOptional: true, }, deleted: { name: "deleted", type: "Boolean", isOptional: true, attributes: [{ "name": "@default", "args": [{ "value": false }] }], }, accounts: { name: "accounts", type: "Account", isDataModel: true, isArray: true, backLink: 'user', }, sessions: { name: "sessions", type: "Session", isDataModel: true, isArray: true, backLink: 'user', }, organizations: { name: "organizations", type: "UserOrganization", isDataModel: true, isArray: true, backLink: 'user', }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, email: { name: "email", fields: ["email"] }, } , } , organization: { name: 'Organization', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, slug: { name: "slug", type: "String", }, name: { name: "name", type: "String", }, projects: { name: "projects", type: "Project", isDataModel: true, isArray: true, backLink: 'organization', }, users: { name: "users", type: "UserOrganization", isDataModel: true, isArray: true, backLink: 'organization', }, deleted: { name: "deleted", type: "Boolean", isOptional: true, attributes: [{ "name": "@default", "args": [{ "value": false }] }], }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, slug: { name: "slug", fields: ["slug"] }, } , } , userOrganization: { name: 'UserOrganization', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, userId: { name: "userId", type: "String", isForeignKey: true, relationField: 'user', }, organizationId: { name: "organizationId", type: "String", isForeignKey: true, relationField: 'organization', }, user: { name: "user", type: "User", isDataModel: true, backLink: 'organizations', isRelationOwner: true, foreignKeyMapping: { "id": "userId" }, }, organization: { name: "organization", type: "Organization", isDataModel: true, backLink: 'users', isRelationOwner: true, foreignKeyMapping: { "id": "organizationId" }, }, role: { name: "role", type: "OrganizationRole", }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, userId_organizationId: { name: "userId_organizationId", fields: ["userId", "organizationId"] }, } , } , project: { name: 'Project', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, slug: { name: "slug", type: "String", }, name: { name: "name", type: "String", }, isArchived: { name: "isArchived", type: "Boolean", attributes: [{ "name": "@default", "args": [{ "value": false }] }], }, organizationId: { name: "organizationId", type: "String", isForeignKey: true, relationField: 'organization', }, organization: { name: "organization", type: "Organization", isDataModel: true, backLink: 'projects', isRelationOwner: true, foreignKeyMapping: { "id": "organizationId" }, }, databases: { name: "databases", type: "Database", isDataModel: true, isArray: true, backLink: 'project', }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, slug: { name: "slug", fields: ["slug"] }, } , } , agent: { name: 'Agent', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, slug: { name: "slug", type: "String", }, name: { name: "name", type: "String", }, description: { name: "description", type: "String", isOptional: true, }, lastContact: { name: "lastContact", type: "DateTime", isOptional: true, }, databases: { name: "databases", type: "Database", isDataModel: true, isArray: true, backLink: 'agent', }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, slug: { name: "slug", fields: ["slug"] }, } , } , database: { name: 'Database', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, name: { name: "name", type: "String", }, dbms: { name: "dbms", type: "Dbms", }, generatedId: { name: "generatedId", type: "String", }, description: { name: "description", type: "String", isOptional: true, }, backupPolicy: { name: "backupPolicy", type: "String", isOptional: true, }, isWaitingForBackup: { name: "isWaitingForBackup", type: "Boolean", isOptional: true, attributes: [{ "name": "@default", "args": [{ "value": false }] }], }, backupToRestore: { name: "backupToRestore", type: "String", isOptional: true, }, agentId: { name: "agentId", type: "String", isForeignKey: true, relationField: 'agent', }, agent: { name: "agent", type: "Agent", isDataModel: true, backLink: 'databases', isRelationOwner: true, foreignKeyMapping: { "id": "agentId" }, }, lastContact: { name: "lastContact", type: "DateTime", isOptional: true, }, backups: { name: "backups", type: "Backup", isDataModel: true, isArray: true, backLink: 'database', }, restorations: { name: "restorations", type: "Restoration", isDataModel: true, isArray: true, backLink: 'database', }, projectId: { name: "projectId", type: "String", isOptional: true, isForeignKey: true, relationField: 'project', }, project: { name: "project", type: "Project", isDataModel: true, isOptional: true, backLink: 'databases', isRelationOwner: true, foreignKeyMapping: { "id": "projectId" }, }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, generatedId: { name: "generatedId", fields: ["generatedId"] }, } , } , backup: { name: 'Backup', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, status: { name: "status", type: "Status", attributes: [{ "name": "@default", "args": [] }], }, file: { name: "file", type: "String", isOptional: true, }, databaseId: { name: "databaseId", type: "String", isForeignKey: true, relationField: 'database', }, database: { name: "database", type: "Database", isDataModel: true, backLink: 'backups', isRelationOwner: true, foreignKeyMapping: { "id": "databaseId" }, }, restorations: { name: "restorations", type: "Restoration", isDataModel: true, isArray: true, backLink: 'backup', }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, } , } , restoration: { name: 'Restoration', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, status: { name: "status", type: "Status", attributes: [{ "name": "@default", "args": [] }], }, backupId: { name: "backupId", type: "String", isForeignKey: true, relationField: 'backup', }, backup: { name: "backup", type: "Backup", isDataModel: true, backLink: 'restorations', isRelationOwner: true, foreignKeyMapping: { "id": "backupId" }, }, databaseId: { name: "databaseId", type: "String", isOptional: true, isForeignKey: true, relationField: 'database', }, database: { name: "database", type: "Database", isDataModel: true, isOptional: true, backLink: 'restorations', isRelationOwner: true, foreignKeyMapping: { "id": "databaseId" }, }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, } , } , settings: { name: 'Settings', fields: { id: { name: "id", type: "String", isId: true, attributes: [{ "name": "@default", "args": [] }], }, createdAt: { name: "createdAt", type: "DateTime", attributes: [{ "name": "@default", "args": [] }], }, updatedAt: { name: "updatedAt", type: "DateTime", isOptional: true, attributes: [{ "name": "@updatedAt", "args": [] }], }, storage: { name: "storage", type: "TypeStorage", attributes: [{ "name": "@default", "args": [] }], }, name: { name: "name", type: "String", }, s3EndPointUrl: { name: "s3EndPointUrl", type: "String", isOptional: true, }, s3AccessKeyId: { name: "s3AccessKeyId", type: "String", isOptional: true, }, s3SecretAccessKey: { name: "s3SecretAccessKey", type: "String", isOptional: true, }, S3BucketName: { name: "S3BucketName", type: "String", isOptional: true, }, smtpPassword: { name: "smtpPassword", type: "String", isOptional: true, }, smtpFrom: { name: "smtpFrom", type: "String", isOptional: true, }, smtpHost: { name: "smtpHost", type: "String", isOptional: true, }, smtpPort: { name: "smtpPort", type: "String", isOptional: true, }, smtpUser: { name: "smtpUser", type: "String", isOptional: true, }, } , uniqueConstraints: { id: { name: "id", fields: ["id"] }, name: { name: "name", fields: ["name"] }, } , } , } , deleteCascade: { user: ['Account', 'Session'], agent: ['Database'], database: ['Backup', 'Restoration'], backup: ['Restoration'], } , authModel: 'User' }; export default metadata;